Skip to content

Commit 5b6ea5f

Browse files
ralyodioclaude
andauthored
fix(ci): finish shell-injection removal in submit-packages + re-enable semgrep --error (#11)
Completes #10: the Chocolatey job's Determine version / Submit / Summary steps and both Linux/Chocolatey Summary steps still interpolated github.event.inputs.* directly in run: blocks. Move them all into step-level env: vars referenced as quoted shell variables, and restore --error on semgrep so findings block CI. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e8491f9 commit 5b6ea5f

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/security.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ jobs:
1717
image: semgrep/semgrep
1818
steps:
1919
- uses: actions/checkout@v4
20-
# Report ERROR-severity findings in the log without failing the build.
21-
# (Drop `--error` to keep semgrep from exiting non-zero on findings.)
2220
- run: |
23-
semgrep scan --severity ERROR \
21+
semgrep scan --error --severity ERROR \
2422
--config p/javascript \
2523
--config p/typescript \
2624
--config p/owasp-top-ten \

.github/workflows/submit-packages.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,14 @@ jobs:
137137

138138
- name: Summary
139139
if: always()
140+
env:
141+
DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }}
140142
run: |
141143
echo "## Package Submission Summary (Linux)" >> $GITHUB_STEP_SUMMARY
142144
echo "" >> $GITHUB_STEP_SUMMARY
143145
echo "- **Version**: ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
144146
echo "- **Package Managers**: ${{ steps.pms.outputs.package_managers }}" >> $GITHUB_STEP_SUMMARY
145-
echo "- **Dry Run**: ${{ github.event.inputs.dry_run || 'false' }}" >> $GITHUB_STEP_SUMMARY
147+
echo "- **Dry Run**: $DRY_RUN" >> $GITHUB_STEP_SUMMARY
146148
147149
# Windows job for Chocolatey
148150
submit-chocolatey:
@@ -172,11 +174,14 @@ jobs:
172174
- name: Determine version
173175
id: version
174176
shell: bash
177+
env:
178+
INPUT_VERSION: ${{ github.event.inputs.version }}
179+
RELEASE_TAG: ${{ github.event.release.tag_name }}
175180
run: |
176-
if [ -n "${{ github.event.inputs.version }}" ]; then
177-
VERSION="${{ github.event.inputs.version }}"
178-
elif [ -n "${{ github.event.release.tag_name }}" ]; then
179-
VERSION="${{ github.event.release.tag_name }}"
181+
if [ -n "$INPUT_VERSION" ]; then
182+
VERSION="$INPUT_VERSION"
183+
elif [ -n "$RELEASE_TAG" ]; then
184+
VERSION="$RELEASE_TAG"
180185
else
181186
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
182187
fi
@@ -201,9 +206,10 @@ jobs:
201206
- name: Submit to Chocolatey
202207
if: steps.check-key.outputs.has_key == 'true'
203208
shell: bash
209+
env:
210+
DRY_RUN: ${{ github.event.inputs.dry_run }}
204211
run: |
205212
VERSION="${{ steps.version.outputs.version }}"
206-
DRY_RUN="${{ github.event.inputs.dry_run }}"
207213
208214
ARGS="-v $VERSION -p chocolatey"
209215
@@ -220,8 +226,10 @@ jobs:
220226
- name: Summary
221227
if: always()
222228
shell: bash
229+
env:
230+
DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }}
223231
run: |
224232
echo "## Package Submission Summary (Chocolatey)" >> $GITHUB_STEP_SUMMARY
225233
echo "" >> $GITHUB_STEP_SUMMARY
226234
echo "- **Version**: ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
227-
echo "- **Dry Run**: ${{ github.event.inputs.dry_run || 'false' }}" >> $GITHUB_STEP_SUMMARY
235+
echo "- **Dry Run**: $DRY_RUN" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)