diff --git a/__tests__/copyleft-policy-check.test.ts b/__tests__/copyleft-policy-check.test.ts index 330a10a..05111ea 100644 --- a/__tests__/copyleft-policy-check.test.ts +++ b/__tests__/copyleft-policy-check.test.ts @@ -60,7 +60,7 @@ describe('CopyleftPolicyCheck', () => { await copyleftPolicyCheck.run(); //neutral cause policy policy halt on failure is not set expect(copyleftPolicyCheck.conclusion).toEqual(CONCLUSION.Neutral); - }, 30000); + }, 50000); it('Copyleft policy empty results', async () => { const TEST_DIR = __dirname; @@ -81,7 +81,7 @@ describe('CopyleftPolicyCheck', () => { await copyleftPolicyCheck.run(); //neutral cause policy policy halt on failure is not set expect(copyleftPolicyCheck.conclusion).toEqual(CONCLUSION.Success); - }, 30000); + }, 50000); it('Copyleft policy explicit licenses', async () => { const TEST_DIR = __dirname; diff --git a/action.yml b/action.yml index f15950c..c4814f2 100644 --- a/action.yml +++ b/action.yml @@ -54,7 +54,7 @@ inputs: required: false runtimeContainer: description: 'Specify runtime container to perform the scan.' - default: 'ghcr.io/scanoss/scanoss-py:v1.18.1' + default: 'ghcr.io/scanoss/scanoss-py:v1.19.0' required: false skipSnippets: description: 'Skip the generation of snippets.' diff --git a/dist/index.js b/dist/index.js index ace6eab..0877612 100644 --- a/dist/index.js +++ b/dist/index.js @@ -125796,7 +125796,7 @@ exports.COPYLEFT_LICENSE_INCLUDE = core.getInput('licenses.copyleft.include'); exports.COPYLEFT_LICENSE_EXCLUDE = core.getInput('licenses.copyleft.exclude'); exports.COPYLEFT_LICENSE_EXPLICIT = core.getInput('licenses.copyleft.explicit'); exports.REPO_DIR = process.env.GITHUB_WORKSPACE; -exports.RUNTIME_CONTAINER = core.getInput('runtimeContainer') || 'ghcr.io/scanoss/scanoss-py:v1.18.1'; +exports.RUNTIME_CONTAINER = core.getInput('runtimeContainer') || 'ghcr.io/scanoss/scanoss-py:v1.19.0'; exports.SKIP_SNIPPETS = core.getInput('skipSnippets') === 'true'; exports.SCAN_FILES = core.getInput('scanFiles') === 'true'; exports.SCANOSS_SETTINGS = core.getInput('scanossSettings') === 'true'; @@ -126114,8 +126114,7 @@ class UndeclaredArgumentBuilder extends argument_builder_1.ArgumentBuilder { '--input', app_input_1.OUTPUT_FILEPATH, '--format', - 'md', - ...(!app_input_1.SCANOSS_SETTINGS ? ['--sbom-format', 'legacy'] : []) // Sets sbom format output to legacy if SCANOSS_SETTINGS is not true + 'md' ]; } } @@ -126580,6 +126579,9 @@ class UndeclaredPolicyCheck extends policy_check_1.PolicyCheck { const { stdout, stderr, exitCode } = await exec.getExecOutput(app_input_1.EXECUTABLE, args, options); const summary = stdout; let details = stderr; + if (!app_input_1.SCANOSS_SETTINGS) { + core.warning('Undeclared policy is being used with SCANOSS settings disabled'); + } if (exitCode === 1) { await this.success('### :white_check_mark: Policy Pass \n #### Not undeclared components were found', undefined); return; @@ -127221,7 +127223,8 @@ class ScanService { return []; } } - return []; + // Force scanoss.py to not load the settings.json file + return ['-stf']; } async parseResult() { const content = await fs_1.default.promises.readFile(this.options.outputFilepath, 'utf-8'); diff --git a/src/app.input.ts b/src/app.input.ts index 1675fc2..f6742a6 100644 --- a/src/app.input.ts +++ b/src/app.input.ts @@ -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.19.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'; diff --git a/src/policies/argument_builders/undeclared-argument-builder.ts b/src/policies/argument_builders/undeclared-argument-builder.ts index 686fe92..7febe19 100644 --- a/src/policies/argument_builders/undeclared-argument-builder.ts +++ b/src/policies/argument_builders/undeclared-argument-builder.ts @@ -22,7 +22,7 @@ */ import { ArgumentBuilder } from './argument-builder'; -import { OUTPUT_FILEPATH, REPO_DIR, RUNTIME_CONTAINER, SCANOSS_SETTINGS } from '../../app.input'; +import { OUTPUT_FILEPATH, REPO_DIR, RUNTIME_CONTAINER } from '../../app.input'; export class UndeclaredArgumentBuilder extends ArgumentBuilder { async build(): Promise { diff --git a/src/services/scan.service.ts b/src/services/scan.service.ts index d1a8330..781625c 100644 --- a/src/services/scan.service.ts +++ b/src/services/scan.service.ts @@ -85,7 +85,7 @@ export interface Options { inputFilepath: string; /** - * Runtime container to perform scan. Default [ghcr.io/scanoss/scanoss-py:v1.18.0] + * Runtime container to perform scan. Default [ghcr.io/scanoss/scanoss-py:v1.19.0] */ runtimeContainer: string;