fix(query): fn for Cloudformation queries - complete boolean logic update#7585
Conversation
…us complete boolean logic update
…_Update--cloudformation/aws
…dformation/aws' of https://github.com/cx-andre-pereira/kics into AST-40783--FN_CloudFormation_Boolean_Logic_Update--cloudformation/aws
…_Update--cloudformation/aws
…_Update--cloudformation/aws
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 19562607 | Triggered | Generic Password | 5cbea1a | assets/queries/common/passwords_and_secrets/test/positive53.json | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- 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
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 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-artur-ribeiro
left a comment
There was a problem hiding this comment.
LGTM, nice addition of new test cases with the string/boolean cases!
Reason for Proposed Changes
trueorfalse, with no quotes, as valid values for scanned files. This is too strict because Cloudformation allows"true"and"false"string values, even within single quotes ('true'). In facto Cloudformation does not support an explicit "Boolean" type, false/true will always be read as strings regardless.Proposed Changes
isCloudFormationTrue, similar to the already implemented , but unused in most relevant queries,isCloudFormationFalsefunction. ThisisCloudFormationFalsefunction was already in use for a few queries but there was never a rundown of them to adjust all other instances of bool comparison.== trueand== falsecomparisons within every query to now make use of the relevant auxiliar functions.I submit this contribution under the Apache-2.0 license.