Skip to content

Improve YAML Hardcoded tokens custom rule - #42

Open
DMarinhoCodacy wants to merge 3 commits into
mainfrom
improve-yaml-hardcoded-tokens-rules
Open

DMarinhoCodacy wants to merge 3 commits into
mainfrom
improve-yaml-hardcoded-tokens-rules

Conversation

@DMarinhoCodacy

Copy link
Copy Markdown
Contributor

No description provided.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

⚠️ Resolve issues before merging

The checked-in expected results are inconsistent with the hardcoded-token rule: line 12 expects a finding for a bracketed redacted value that none of the rule alternatives matches. This should be resolved by either supporting that format intentionally or removing the expected finding.

Coverage is also missing for common GitHub, GitLab, Slack, and npm formats, as well as safe numeric, null, environment-reference, anchor, and block-scalar values.

Test suggestions

  • Detect token-like keys with literal, quoted, and templated values
  • Detect token-like keys using hyphens and compound names
  • Detect common GitHub, GitLab, Slack, and npm token formats
  • Do not flag booleans, short values, or unrelated templated values
  • Do not flag numeric, null, environment-reference, anchor, and block-scalar values for exact token keys
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Detect common GitHub, GitLab, Slack, and npm token formats
2. Do not flag numeric, null, environment-reference, anchor, and block-scalar values for exact token keys

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

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.

1 participant