Repository navigation
TCE-1591 Create custom rule to detect hardcoded tokens for yaml files - #34
Merged
Merged
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
The token-detection rule has a substantive coverage gap: common token key names and YAML scalar representations are not detected, so hardcoded tokens can bypass the rule. This should be addressed before merging.
The acceptance criteria around token detection and SSRF mapping lack automated test coverage. Codacy reports the PR as up to standards, but no coverage data is available for these changes.
About this PR
- Please document the supported token-key/value syntax and add automated tests for the rule and OWASP mapping. The unrelated SSRF mapping change also needs its relationship to this PR clarified.
Test suggestions
- Detect a quoted hardcoded value for a key such as access_token or api-token.
- Detect token keys in common forms such as token, token_value, and TOKEN_VALUE.
- Do not report token keys whose values are absent or non-hardcoded placeholders, according to the intended rule behavior.
- Map A10:2021 server-side request forgery and its abbreviated form to InputValidation.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Detect a quoted hardcoded value for a key such as access_token or api-token.
2. Detect token keys in common forms such as token, token_value, and TOKEN_VALUE.
3. Do not report token keys whose values are absent or non-hardcoded placeholders, according to the intended rule behavior.
4. Map A10:2021 server-side request forgery and its abbreviated form to InputValidation.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
heliocodacy
approved these changes
Sep 11, 2026
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.
No description provided.