Skip to content

Commit

Permalink
default output paths include run_id (#18)
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Long <[email protected]>
  • Loading branch information
bluesentinelsec and Michael Long authored Mar 28, 2024
1 parent aec49aa commit d86b7dc
Show file tree
Hide file tree
Showing 24 changed files with 11 additions and 1,159 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
run:
docker build . -t plugin:latest
docker run -it plugin:latest --artifact-type container
docker build . -t inspector-action:latest
docker run -it inspector-action:latest

test:
cd entrypoint; python3 -m unittest discover -v -s ./
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ inputs:
output_sbom_path:
description: "The destination file path for the generated SBOM."
required: False
default: '/tmp/sbom.json'
default: './sbom_${{ github.run_id }}.json'

output_inspector_scan_path:
description: "The destination file path for Inspector's vulnerability scan (JSON format)."
required: False
default: '/tmp/inspector_scan.json'
default: 'inspector_scan_${{ github.run_id }}.json'

output_inspector_scan_path_csv:
description: "The destination file path for Inspector's vulnerability scan (CSV format)."
required: False
default: '/tmp/inspector_scan.csv'
default: 'inspector_scan_${{ github.run_id }}.csv'


sbomgen_version:
Expand Down
14 changes: 6 additions & 8 deletions entrypoint/entrypoint/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ def init(sys_argv=None) -> argparse.Namespace:
"""
program_description = "This program orchestrates the business logic for the Amazon Inspector GitHub Actions plugin."
parser = argparse.ArgumentParser(description=program_description)
parser.add_argument('--artifact-type', type=str,
parser.add_argument('--artifact-type', type=str, default="repository",
help='The artifact you would like to scan with Amazon Inspector. Valid choices are "repository", "container", "binary", or "archive".')
parser.add_argument("--artifact-path", type=str,
parser.add_argument("--artifact-path", type=str, default="./",
help='The path to the artifact you would like to scan with Amazon Inspector. If scanning a container image, you must provide a value that follows the docker pull convention: "NAME[:TAG|@DIGEST]", for example, "alpine:latest", or a path to an image exported as tarball using "docker save".')
parser.add_argument("--out-sbom", type=str, help="The destination file path for the generated SBOM.")
parser.add_argument("--out-scan", type=str,
parser.add_argument("--out-sbom", type=str, default="/tmp/sbom.json", help="The destination file path for the generated SBOM.")
parser.add_argument("--out-scan", type=str, default="/tmp/scan.json",
help="The destination file path for Inspector's vulnerability scan in JSON format.")
parser.add_argument("--out-scan-csv", type=str,
parser.add_argument("--out-scan-csv", type=str, default="/tmp/scan.csv",
help="The destination file path for Inspector's vulnerability scan in CSV format.")
parser.add_argument("--verbose", action="store_true", help="Enables verbose console logging.")
parser.add_argument("--sbomgen-version", type=str,
parser.add_argument("--sbomgen-version", type=str, default="latest",
help="The inspector-sbomgen version you wish to use for SBOM generation.")
parser.add_argument("--sbomgen-args", nargs="+",
help="Any additional arguments you wish to provide to inspector-sbomgen. Download sbomgen and execute it with './inspector-sbomgen --help' to see available arguments. https://docs.aws.amazon.com/inspector/latest/user/sbom-generator.html")
parser.add_argument("--thresholds", action="store_true",
help='This will cause the program to fail with exit code 1 if vulnerability thresholds are exceeded.')
parser.add_argument("--critical", type=int, default=0,
Expand Down
19 changes: 0 additions & 19 deletions scripts/decode_action_output.py

This file was deleted.

Empty file removed scripts/entrypoint/__init__.py
Empty file.
26 changes: 0 additions & 26 deletions scripts/entrypoint/action_args.py

This file was deleted.

17 changes: 0 additions & 17 deletions scripts/entrypoint/downloader.py

This file was deleted.

40 changes: 0 additions & 40 deletions scripts/entrypoint/entrypoint.py

This file was deleted.

22 changes: 0 additions & 22 deletions scripts/entrypoint/extractor.py

This file was deleted.

19 changes: 0 additions & 19 deletions scripts/entrypoint/finder.py

This file was deleted.

Loading

0 comments on commit d86b7dc

Please sign in to comment.