|
| 1 | +# Copyright 2024 Amazon.com, Inc. or its affiliates. |
| 2 | +# |
| 3 | +# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 4 | +# of this software and associated documentation files (the "Software"), to deal |
| 5 | +# in the Software without restriction, including without limitation the rights |
| 6 | +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 7 | +# copies of the Software, and to permit persons to whom the Software is |
| 8 | +# furnished to do so, subject to the following conditions: |
| 9 | +# |
| 10 | +# The above copyright notice and this permission notice shall be included in all |
| 11 | +# copies or substantial portions of the Software. |
| 12 | +# |
| 13 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 14 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 15 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 16 | +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 17 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 18 | +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 19 | +# SOFTWARE. |
| 20 | +# |
| 21 | +# Portions of this file are derived from the README examples, retrieved on 2025-08-11 from |
| 22 | +# https://github.com/aws-actions/vulnerability-scan-github-action-for-amazon-inspector/blob/4e74c0428eb3178778d186bf97daa347852858d1/README.md |
| 23 | + |
| 24 | +name: SBOM |
| 25 | +on: |
| 26 | + pull_request: |
| 27 | + types: [opened, synchronize] |
| 28 | +jobs: |
| 29 | + daily_job: |
| 30 | + runs-on: ubuntu-latest |
| 31 | + |
| 32 | + steps: |
| 33 | + - name: Checkout this repository |
| 34 | + uses: actions/checkout@v4 |
| 35 | + |
| 36 | + - name: Inspector Scan |
| 37 | + id: inspector |
| 38 | + uses: aws-actions/vulnerability-scan-github-action-for-amazon-inspector@v1.3.0 |
| 39 | + with: |
| 40 | + artifact_type: 'repository' |
| 41 | + artifact_path: './' |
| 42 | + display_vulnerability_findings: "enabled" |
| 43 | + critical_threshold: 1 |
| 44 | + high_threshold: 1 |
| 45 | + medium_threshold: 1 |
| 46 | + low_threshold: 1 |
| 47 | + other_threshold: 1 |
| 48 | + |
| 49 | + - name: Display CycloneDX SBOM |
| 50 | + run: cat ${{ steps.inspector.outputs.artifact_sbom }} |
| 51 | + |
| 52 | + - name: Display Inspector vulnerability scan results |
| 53 | + run: cat ${{ steps.inspector.outputs.inspector_scan_results_markdown }} |
| 54 | + |
| 55 | + - name: Upload Scan Results |
| 56 | + uses: actions/upload-artifact@v4 |
| 57 | + with: |
| 58 | + name: Inspector Vulnerability Scan Artifacts |
| 59 | + path: | |
| 60 | + ${{ steps.inspector.outputs.artifact_sbom }} |
| 61 | + ${{ steps.inspector.outputs.inspector_scan_results_markdown }} |
0 commit comments