Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common Issues #325

Open
georgedias opened this issue Nov 1, 2024 · 0 comments
Open

Common Issues #325

georgedias opened this issue Nov 1, 2024 · 0 comments

Comments

@georgedias
Copy link
Contributor

georgedias commented Nov 1, 2024

File control.ts toString method

change:

    if (this.impact) {
      result += `  impact ${this.impact}\n`;
    }

to:

    if (this.impact) {
      result += `  impact ${this.impact}\n`;
    } else if (this.impact === 0) {
      result += `  impact ${this.impact.toFixed(1)}\n`;
    }

Add function to copy describe block from source to destination control

In updates.ts add this function

export function updateControlDescribeBlock(from: Control, update: Partial<Control>, logger: winston.Logger): Control {
  const existingDescribeBlock = getExistingDescribeFromControl(from)
  logger.debug(`Updating control ${update.id} with this describe block: ${JSON.stringify(existingDescribeBlock)}`)
  const projectedControl = new Control(update)
  projectedControl.describe = existingDescribeBlock
  return projectedControl
}

Use Abstract Syntax Tree (AST) npm Library

Implement the updates to profiles and controls using the AST-GREP npm package

Object Types Library

SpreadsheetTypes

SpreadsheetTypes is a type alias for the possible types of spreadsheets. It is used to specify the type of spreadsheet when calling functions that require this information. Currently, the possible types are 'cis', 'disa', and 'general'.

export enum SpreadsheetTypes {
   CIS = 'cis',
   DISA = 'disa',
   GENERAL = 'general'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant