Repository navigation
Address open code scanning alerts - #454
Merged
Merged
Conversation
- Strip line breaks from the unrecognized webhook payload before logging it, and cap it at 1000 characters, so unauthenticated input can't forge log entries (cs/log-forging). - Default both workflows to a read-only GITHUB_TOKEN and grant write access only to the jobs that need it: contents: write for the Windows release job, and contents: write plus packages: read for the alpha release cleanup (actions/missing-workflow-permissions).
|
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes the 7 open code scanning alerts on
develop.Log forging (alert #7, error)
WebhookControllerlogged the raw request body when a webhook payload wasn't recognized. The endpoint is unauthenticated, so a body containing line breaks could write fake entries into the log. The body is now logged with\rand\nremoved and cut to its first 1000 characters, along with its full length.Workflow token permissions (alerts #1–6, warnings)
Both workflows now default to
permissions: contents: read. Only these jobs get more:docker-publish.ymlwindows-build-pushcontents: writesoftprops/action-gh-releasecleanup-alpha-releases.ymlcleanup-alpha-releasescontents: write,packages: readThe other jobs only read the repo. The Docker Hub push and SonarQube analysis use their own secrets, not
GITHUB_TOKEN.Testing
dotnet buildsucceeds;dotnet test: 1556 passed, 2 skipped.🤖 Generated with Claude Code