FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix code injection warnings in `check-codescanning-config` internal Action by angelapwen · Pull Request #2781 · github/codeql-action · GitHub

Fix code injection warnings in check-codescanning-config internal Action - #2781

Merged
angelapwen merged 8 commits into
mainfrom
angelapwen/fix-code-injection-warning
Feb 25, 2025
Merged

angelapwen merged 8 commits into
mainfrom
angelapwen/fix-code-injection-warning

Conversation

Copy link
Copy Markdown
Contributor
  • Use environment variable for EXPECTED_CONFIG_FILE_CONTENTS to escape any injected input
  • Use $RUNNER_TEMP rather than ${{ runner.temp }} for good measure, even though runner.temp should not be user-controlled input anyway.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

`runner.temp` is not user-controlled but we replace it with `$RUNNER_TEMP` in any case.
Copilot AI review requested due to automatic review settings February 24, 2025 20:37
angelapwen requested a review from a team as a code owner February 24, 2025 20:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

PR Overview

This PR fixes code injection warnings in the check-codescanning-config Action by switching to environment variables and safer temporary directory references.

  • Replace user-supplied inline inputs with environment variables for improved security.
  • Update temporary directory references to use $RUNNER_TEMP.

Reviewed Changes

File Description
.github/actions/check-codescanning-config/action.yml Updated to use environment variable EXPECTED_CONFIG_FILE_CONTENTS and $RUNNER_TEMP for file paths in commands and cleanup steps.

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

aeisenberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

See copilot's comment.

angelapwen and others added 2 commits February 24, 2025 12:52
aeisenberg previously approved these changes Feb 24, 2025

Copy link
Copy Markdown
Contributor

Oh...now it looks like the tests need to be updated. I'm not sure if this is a semantic change or just some artifact of how the quoting has changed.

Copy link
Copy Markdown
Contributor Author

Hrm.. looks like the "{}" input is now being parsed as undefined. Let me try to debug..

angelapwen force-pushed the angelapwen/fix-code-injection-warning branch from 0bbfcad to e12eb8d Compare February 24, 2025 21:24

Copy link
Copy Markdown
Contributor Author

Okay, figured it out... I had declared the environment variable in the wrong block 🤦

angelapwen merged commit a8849fb into main Feb 25, 2025
angelapwen deleted the angelapwen/fix-code-injection-warning branch February 25, 2025 00:53
github-actions Bot mentioned this pull request Mar 7, 2025
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL