Skip to content

Conversation

cx-ricardo-jesus
Copy link
Contributor

@cx-ricardo-jesus cx-ricardo-jesus commented Jul 17, 2025

Reason for Proposed Changes

  • The query Passwords and Secrets - Generic Password, incorrectly flags a string that collects a password from parameters which is not correct.

Proposed Changes

  • Added a new allowRule with a regex to detect passwords which are passed through ARM parameters via parameters('parameterName') syntax in order to prevent false positives in this cases.
  • Also, added a new negative test called "negative53.json", which has a line that creates a connection string and collects the password externally.
  • Added one extra positive test called positive53.json, that instead of having parameter reference, has a hardcoded password which should return a positive result on line 54.

I submit this contribution under the Apache-2.0 license.

@cx-ricardo-jesus cx-ricardo-jesus requested a review from a team as a code owner July 17, 2025 13:50
@cx-ricardo-jesus cx-ricardo-jesus marked this pull request as draft July 17, 2025 13:50
@github-actions github-actions bot added community Community contribution query New query feature arm Azure Resource Manager query labels Jul 17, 2025
@cx-artur-ribeiro cx-artur-ribeiro marked this pull request as ready for review July 17, 2025 13:51
@cx-artur-ribeiro cx-artur-ribeiro marked this pull request as draft July 17, 2025 13:51
@cx-ricardo-jesus cx-ricardo-jesus marked this pull request as ready for review July 17, 2025 14:57
@cx-ricardo-jesus cx-ricardo-jesus changed the title fix(query): added one more allow rule on Generic Password query to allow passowords retrieved from ARM parameters fix(query): added one more allow rule on Generic Password query to allow passwords retrieved from ARM parameters Jul 17, 2025
Copy link
Contributor

@cx-artur-ribeiro cx-artur-ribeiro left a comment

Choose a reason for hiding this comment

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

LGTM

@Checkmarx Checkmarx deleted a comment from gitguardian bot Jul 30, 2025
Copy link

gitguardian bot commented Aug 4, 2025

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- - Generic Password 707c060 assets/queries/common/passwords_and_secrets/test/positive53.json View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@cx-ricardo-jesus cx-ricardo-jesus merged commit f46593c into Checkmarx:master Aug 4, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arm Azure Resource Manager query community Community contribution query New query feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants