-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71 from mitre/update-actions-to-v4
Update README file to use actions v4
- Loading branch information
Showing
4 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Provide a few examples for using saf_action in GitHub workflows | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: windows-2022 | ||
steps: | ||
- name: Checkout repo to have access to test data | ||
uses: actions/checkout@v4 | ||
- name: Test convert data | ||
uses: mitre/saf_action@main | ||
with: | ||
command_string: 'convert burpsuite2hdf -i ./test/sample_data/burpsuite_sample.min -o burpsuite_hdf.json' | ||
- name: View summary of burpsuite results | ||
uses: mitre/saf_action@main | ||
with: | ||
command_string: 'view summary -i burpsuite_hdf.json' | ||
- name: Test validate threshold with -T | ||
uses: mitre/saf_action@main | ||
with: | ||
command_string: 'validate threshold -i ./test/sample_data/red_hat_good.json -I "{\\"error.total\\": 0, \\"compliance.min\\": 50}"' | ||
- name: Test validate threshold with -T with a space in the path | ||
uses: mitre/saf_action@main | ||
with: | ||
command_string: 'validate threshold -i ./test/sample_data/red_hat_good\ with_space.json -I "{\\"error.total\\": 0, \\"compliance.min\\": 50}"' | ||
- name: Artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: success() | ||
with: | ||
name: burpsuite | ||
path: burpsuite_hdf.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const saf_action = require('./run_command.js'); | ||
const path = require('node:path'); | ||
|
||
saf_action({safCLIPath: path.join(process.env.HOME, 'work/_actions/', process.env.GITHUB_ACTION_REPOSITORY, process.env.GITHUB_ACTION_REF, 'node_modules/@mitre/saf/lib/index.js')}); | ||
saf_action({safCLIPath: path.join(process.env.GITHUB_WORKSPACE, '../..', '_actions/', process.env.GITHUB_ACTION_REPOSITORY, process.env.GITHUB_ACTION_REF, 'node_modules/@mitre/saf/lib/index.js')}); |