Skip to content

Commit de3cab3

Browse files
committed
chore: improve issues management
Signed-off-by: Jefferson <jefferson.rios.caro@gmail.com>
1 parent d64b3b9 commit de3cab3

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/check-vulns.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,16 @@ jobs:
6161
working-directory: ./dep_checker
6262
# Write clean JSON to result.json (diagnostics go to stderr). A non-zero exit
6363
# just means "vulnerabilities were found" — it must not skip reconciliation.
64+
# nsolidStream is passed via env (never interpolated into the shell) to avoid
65+
# script injection from the workflow_dispatch input.
66+
env:
67+
NSOLID_STREAM: ${{ inputs.nsolidStream }}
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
6470
run: |
6571
python3 main.py --scan-file result.json --include-npm --npm-timeout 600 \
66-
--gh-token ${{ secrets.GITHUB_TOKEN }} --nvd-key=${{ secrets.NVD_API_KEY }} \
67-
../nsolid ${{ inputs.nsolidStream }} || true
72+
--gh-token "$GITHUB_TOKEN" --nvd-key="$NVD_API_KEY" \
73+
../nsolid "$NSOLID_STREAM" || true
6874
echo "Scan result:"
6975
cat result.json
7076
- name: Reconcile issues
@@ -73,8 +79,10 @@ jobs:
7379
env:
7480
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7581
GH_REPO: ${{ github.repository }}
82+
NSOLID_STREAM: ${{ inputs.nsolidStream }}
83+
ACTION_URL: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
7684
run: |
7785
python3 reconcile_issues.py \
78-
--stream "${{ inputs.nsolidStream }}" \
86+
--stream "$NSOLID_STREAM" \
7987
--scan-file result.json \
80-
--action-url "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
88+
--action-url "$ACTION_URL"

0 commit comments

Comments
 (0)