Skip to content

Commit 17e2e68

Browse files
Added clean to build command #TASK-7908
1 parent 4fb86ca commit 17e2e68

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/compare-vulnerabilities.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 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 }}'
33
on:
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+

0 commit comments

Comments
 (0)