Skip to content

Address gosec alerts in mangle-test-json#5260

Open
Copilot wants to merge 5 commits intomainfrom
copilot/sub-pr-5220
Open

Address gosec alerts in mangle-test-json#5260
Copilot wants to merge 5 commits intomainfrom
copilot/sub-pr-5220

Conversation

Copy link
Contributor

Copilot AI commented Mar 20, 2026

gosec flagged unsafe file handling patterns in mangle-test-json. One alert was a genuine path traversal risk; the others were false positives on already-escaped output.

  • Real vulnerability: Replaced direct file open with os.OpenRoot() to prevent path traversal abuse
  • False positives: Suppressed gosec alerts where output is already escaped and the warning doesn't apply
  • Maintenance: Merged latest main to keep branch current

How does this PR make you feel?

Checklist

  • this PR contains documentation
  • this PR contains tests
  • this PR contains YAML Samples

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Address gosec alerts in mangle-test-json Address gosec alerts in mangle-test-json Mar 20, 2026
@theunrepentantgeek theunrepentantgeek marked this pull request as ready for review March 20, 2026 04:36

# This is pinned to a particular version of go:
FROM mcr.microsoft.com/devcontainers/go:1.25
FROM mcr.microsoft.com/devcontainers/go:2-1.26
Copy link
Member

Choose a reason for hiding this comment

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

possibly worth a note here explaining what the heck this version is now lol

Copy link
Member

Choose a reason for hiding this comment

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

Comment added.

analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
runs-on: [self-hosted, 1ES.Pool=aso-1es-pool]
Copy link
Member

Choose a reason for hiding this comment

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

minor: maybe note why this runs here (due to resources).

Copy link
Member

Choose a reason for hiding this comment

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

Comment added.


- name: Upload release assets
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # this is v2.9.0, but pinned
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # this is v2.9.0, but pinned
Copy link
Member

Choose a reason for hiding this comment

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

Can't still be 2.9.0 can it? hash changed?

Copy link
Member

Choose a reason for hiding this comment

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

This is v211.5 - dependabot doesn't recornize that comment format and didn't update the comment. Fixed in #5254


- name: Upload release assets
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # this is v2.9.0, but pinned
uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # this is v2.9.0, but pinned
Copy link
Member

Choose a reason for hiding this comment

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

same comment

Copy link
Member

Choose a reason for hiding this comment

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

same fix. ;-)

@theunrepentantgeek theunrepentantgeek changed the base branch from fix/mangle-test-security to main March 22, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants