File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Compare vulnerabilities (Syft SBOM -> Grype) between two branches (robust)
2-
2+ run-name : ' Compare vulnerabilities between (Base) ${{ inputs.branch_a }} and (Base) ${{ inputs.branch_b }} by @${{ github.actor }} '
33on :
44 workflow_dispatch :
55 inputs :
@@ -16,27 +16,27 @@ jobs:
1616 runs-on : ${{ vars.UBUNTU_VERSION }}
1717
1818 steps :
19- # 1) Checkout only the HEAD branch
19+ # 1) Checkout head branch only
2020 - name : Checkout head branch
2121 uses : actions/checkout@v4
2222 with :
2323 ref : ${{ github.event.inputs.branch_b }}
2424 fetch-depth : 0
2525 fetch-tags : true
2626
27- # 2) Explicitly fetch the BASE branch so it exists locally
27+ # 2) Ensure base branch exists locally (fetch)
2828 - name : Fetch base branch
2929 run : |
3030 git fetch origin ${{ github.event.inputs.branch_a }}:refs/remotes/origin/${{ github.event.inputs.branch_a }}
3131
32- # 3) Run the vulnerability diff action
32+ # 3) Run the action
3333 - name : Vulnerability Diff (Syft+Grype)
3434 uses : sec-open/vuln-diff-action@v1
3535 with :
36- # Use refs that are guaranteed to exist locally
37- base_ref : refs/remotes/origin/${{ github.event.inputs.branch_a }}
38- head_ref : ${{ github.sha }} # safer than branch name to avoid worktree conflicts
36+ base_ref : ${{ github.event.inputs.branch_a }} # pass 'develop'
37+ head_ref : ${{ github.event.inputs.branch_b }} # pass 'TASK-7908'
3938 build_command : " mvn -q -DskipTests clean package"
4039 min_severity : " LOW"
4140 write_summary : " true"
4241 path : " ."
42+
You can’t perform that action at this time.
0 commit comments