Skip to content

Commit

Permalink
Merge pull request #1 from SocialGouv/options
Browse files Browse the repository at this point in the history
feat: add inputs.options
  • Loading branch information
mbogh authored Apr 2, 2021
2 parents 58c4e28 + d96f603 commit 4e4ac62
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ A GitHub Action for scanning a host with [testssl.sh](https://testssl.sh) and co
- `image`: Docker image to run testssl.sh (Default: `drwetter/testssl.sh`)
- `output`: Folder for scan reports (Default: `output`)
- `grade`: Minimum accepted grade (Default: `A+`)
- `options`: Additionnal testssl.sh CLI options

## Outputs

Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ inputs:
grade:
description: 'Minimum accepted grade'
default: 'A+'
options:
description: 'Additionnal testssl.sh CLI options'
default: ''
runs:
using: 'node12'
main: 'dist/index.js'
5 changes: 3 additions & 2 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ async function run() {
let image = core.getInput('image');
let host = core.getInput('host');
let output = core.getInput('output');
let options = core.getInput('options');
let thresshold = Grades[core.getInput('grade')];

await exec.exec(`mkdir -p ${workspace}/${output}`);
await exec.exec(`docker pull ${image} -q`);
let command = (`docker run --user 0:0 -v ${workspace}/${output}:/data --network="host" ` + `-t ${image} --jsonfile /data --csvfile /data --htmlfile /data ${host}`);
await exec.exec(`docker pull ${image} -q`);
let command = (`docker run --user 0:0 -v ${workspace}/${output}:/data --network="host" ` + `-t ${image} --jsonfile /data --csvfile /data --htmlfile /data ${options} ${host}`);
try {
await exec.exec(command);

Expand Down

0 comments on commit 4e4ac62

Please sign in to comment.