Skip to content

Commit a8849fb

Browse files
authored
Merge pull request #2781 from github/angelapwen/fix-code-injection-warning
Fix code injection warnings in `check-codescanning-config` internal Action
2 parents d3c7d03 + 628c1e6 commit a8849fb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/actions/check-codescanning-config/action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ runs:
6161
- name: Check config
6262
working-directory: ${{ github.action_path }}
6363
shell: bash
64-
run: ts-node ./index.ts "${{ runner.temp }}/user-config.yaml" '${{ inputs.expected-config-file-contents }}'
65-
64+
env:
65+
EXPECTED_CONFIG_FILE_CONTENTS: '${{ inputs.expected-config-file-contents }}'
66+
run: ts-node ./index.ts "$RUNNER_TEMP/user-config.yaml" "$EXPECTED_CONFIG_FILE_CONTENTS"
6667
- name: Clean up
6768
shell: bash
6869
if: always()
6970
run: |
70-
rm -rf ${{ runner.temp }}/codescanning-config-cli-test
71-
rm -rf ${{ runner.temp }}/user-config.yaml
71+
rm -rf $RUNNER_TEMP/codescanning-config-cli-test
72+
rm -rf $RUNNER_TEMP/user-config.yaml

.github/actions/check-codescanning-config/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const actualConfig = loadActualConfig()
88

99
const rawExpectedConfig = process.argv[3].trim()
1010
if (!rawExpectedConfig) {
11-
core.info('No expected configuration provided')
11+
core.setFailed('No expected configuration provided')
1212
} else {
1313
core.startGroup('Expected generated user config')
1414
core.info(yaml.dump(JSON.parse(rawExpectedConfig)))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy