Skip to content

fix: add support for xml generic token#382

Draft
cx-artur-ribeiro wants to merge 4 commits intomasterfrom
AST-141719-GenericToken-xml-support
Draft

fix: add support for xml generic token#382
cx-artur-ribeiro wants to merge 4 commits intomasterfrom
AST-141719-GenericToken-xml-support

Conversation

@cx-artur-ribeiro
Copy link
Copy Markdown

@cx-artur-ribeiro cx-artur-ribeiro commented Mar 30, 2026

Proposed Changes

  • The Generic-Api-Key regex (from generateSemiGenericRegexIncludingXml) expected an assignment operator (:, =, etc.) right after the keyword and its suffix. That matches YAML like token: ghp_... and plist-style ......, but not typical config XML: , where the secret is separated by another attribute (value="...) instead of an operator immediately after token or secret.
    <Parameter name="github_token" value="ghp_1234567890abcdefghijklmnopqrstuv"/>
    <Parameter name="jwt_secret" value="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"/>
  • Added in utils.go, an optional bridge value=" (operatorOrXmlValue) before the operator, so that after matching the identifier (e.g. token in github_token) and the closing quote, the pattern can consume value=" and then match the secret (same idea as the existing plist bridge, but for attribute-style XML).

Checklist

  • I covered my changes with tests.
  • I Updated the documentation that is affected by my changes:
    • Change in the CLI arguments
    • Change in the configuration file

I submit this contribution under the Apache-2.0 license.

@cx-artur-ribeiro cx-artur-ribeiro self-assigned this Mar 30, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

kics-logo

KICS version: v2.1.20

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 16
Files parsed placeholder 16
Files failed to scan placeholder 0
Total executed queries placeholder 52
Queries failed to execute placeholder 0
Execution time placeholder 0

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

Logo
Checkmarx One – Scan Summary & Detailsf93c2eab-93a3-47a2-989f-930809104570

Great job! No new security vulnerabilities introduced in this pull request

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.

2 participants