Skip to content

Commit

Permalink
SCP-79 Adds parameter 'with-dependencies'
Browse files Browse the repository at this point in the history
  • Loading branch information
isasmendiagus committed Jan 25, 2024
1 parent 286c3c9 commit e780700
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: ./
with:
# sbom-ignore: 'scanoss-ignore.json'
with-dependencies: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Print stdout scan command
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ inputs:
api-url:
description: 'SCANOSS API URL (optional - default: https://osskb.org/api/scan/direct)'
required: false
with-dependencies:
description: Scan dependencies (optional - default false)
required: false

# Define your outputs here.
outputs:
Expand Down
7 changes: 4 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/app.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ export const SBOM_INDENTIFY = core.getInput('sbom-identify');
export const SBOM_IGNORE = core.getInput('sbom-ignore');
export const API_KEY = core.getInput('api-key');
export const API_URL = core.getInput('api-url');
export const WITH_DEPENDENCIES = core.getInput('with-dependencies');
4 changes: 2 additions & 2 deletions src/services/scan.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as input from '../app.input';

export function commandBuilder(): string {
return `docker run -v "${input.REPO_DIR}":"/scanoss" ghcr.io/scanoss/scanoss-py:v1.9.0 scan .
--dependencies
--output ${input.OUTPUT_PATH}
--output ${input.OUTPUT_PATH}
${input.WITH_DEPENDENCIES ? `--dependencies` : ''}
${input.SBOM_INDENTIFY ? `--identify ${input.SBOM_INDENTIFY}` : ''}
${input.SBOM_IGNORE ? `--ignore ${input.SBOM_IGNORE}` : ''}
${input.API_URL ? `--apiurl ${input.API_URL}` : ''}
Expand Down

0 comments on commit e780700

Please sign in to comment.