Skip to content

Commit

Permalink
chore: SP-1979 Removes sbom.json export format
Browse files Browse the repository at this point in the history
  • Loading branch information
agustingroh committed Dec 20, 2024
1 parent 66815e3 commit d9c1aa9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
5 changes: 1 addition & 4 deletions __tests__/undeclared-argument-builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ describe('UndeclaredArgumentBuilder', () => {
appInput.REPO_DIR = 'repodir';
appInput.OUTPUT_FILEPATH = 'results.json';
appInput.SCANOSS_SETTINGS = false;
appInput.SBOM_ENABLED = true;
const builder = new UndeclaredArgumentBuilder();
const cmd = await builder.build();
expect(cmd).toEqual([
Expand All @@ -32,9 +31,7 @@ describe('UndeclaredArgumentBuilder', () => {
'--input',
'results.json',
'--format',
'md',
'--sbom-format',
'legacy'
'md'
]);
});

Expand Down
2 changes: 1 addition & 1 deletion src/app.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const COPYLEFT_LICENSE_INCLUDE = core.getInput('licenses.copyleft.include
export const COPYLEFT_LICENSE_EXCLUDE = core.getInput('licenses.copyleft.exclude');
export const COPYLEFT_LICENSE_EXPLICIT = core.getInput('licenses.copyleft.explicit');
export const REPO_DIR = process.env.GITHUB_WORKSPACE as string;
export const RUNTIME_CONTAINER = core.getInput('runtimeContainer') || 'ghcr.io/scanoss/scanoss-py:v1.18.1';
export const RUNTIME_CONTAINER = core.getInput('runtimeContainer') || 'ghcr.io/scanoss/scanoss-py:v1.18.0';
export const SKIP_SNIPPETS = core.getInput('skipSnippets') === 'true';
export const SCAN_FILES = core.getInput('scanFiles') === 'true';
export const SCANOSS_SETTINGS = core.getInput('scanossSettings') === 'true';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ export class UndeclaredArgumentBuilder extends ArgumentBuilder {
'--input',
OUTPUT_FILEPATH,
'--format',
'md',
...(!SCANOSS_SETTINGS ? ['--sbom-format', 'legacy'] : []) // Sets sbom format output to legacy if SCANOSS_SETTINGS is not true
'md'
];
}
}
2 changes: 1 addition & 1 deletion src/policies/undeclared-policy-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import { PolicyCheck } from './policy-check';
import { CHECK_NAME } from '../app.config';
import * as core from '@actions/core';
import { EXECUTABLE } from '../app.input';
import { EXECUTABLE, SCANOSS_SETTINGS } from '../app.input';

Check warning on line 27 in src/policies/undeclared-policy-check.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

'SCANOSS_SETTINGS' is defined but never used

Check warning on line 27 in src/policies/undeclared-policy-check.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

'SCANOSS_SETTINGS' is defined but never used
import * as exec from '@actions/exec';
import { UndeclaredArgumentBuilder } from './argument_builders/undeclared-argument-builder';
import { ArgumentBuilder } from './argument_builders/argument-builder';
Expand Down

0 comments on commit d9c1aa9

Please sign in to comment.