Skip to content

Commit

Permalink
Merge pull request #16 from rom1K/main
Browse files Browse the repository at this point in the history
Make output folder overridable
  • Loading branch information
javixeneize authored Oct 12, 2022
2 parents 931d0dd + 328f19e commit 1b5d19f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ inputs:
required: true
format:
required: true
out:
required: true
default: 'reports'

args:
required: false
runs:
Expand All @@ -25,6 +29,6 @@ runs:
- '--format'
- '${{ inputs.format }}'
- '--out'
- '/github/workspace/reports'
- '/github/workspace/${{ inputs.out }}'
- '--noupdate'
- ${{ inputs.args }}
16 changes: 12 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ This action is based upon the OWASP Dependency-Check [tool](https://owasp.org/ww

# How does it work?

The action receives three parameters: Project name, scanpath and report format, but more parameters can be added as optional.
The action has three required parameters:

- `project`: the project name
- `path`: the scanpath
- `format`: the report format

Additionally, you can specify:

- `out`: the output folder location relative to the github workspace, by default it will be `reports`
- `args`: any remaining flags and parameters to the binary, check the [arguments page](https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html) for valid options

Example:
```
Expand All @@ -31,7 +40,8 @@ jobs:
with:
project: 'test'
path: '.'
format: 'HTML'
format: 'HTML'
out: 'reports' # this is the default, no need to specify unless you wish to override it
args: >
--failOnCVSS 7
--enableRetired
Expand All @@ -42,8 +52,6 @@ jobs:
path: ${{github.workspace}}/reports
```

*args* allows to pass established flags and parameters to the binary. Check the [arguments page](https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html) for valid options

### Error: JAVA_HOME is not defined correctly
When used in conjunction with the GitHub Action [setup-java](https://github.com/actions/setup-java) you will see the error `Error: JAVA_HOME is not defined correctly`

Expand Down

0 comments on commit 1b5d19f

Please sign in to comment.