Skip to content

Conversation

cx-artur-ribeiro
Copy link
Contributor

@cx-artur-ribeiro cx-artur-ribeiro commented Feb 27, 2025

Reason for Proposed Changes:

  • Address false positives in the Passwords and Secrets query caused by specific patterns.

Proposed Changes:

  • Added 4 new Allow Rules to handle common password retrieval cases and Terraform type object definitions:
    • Allow passwords retrieved from Terraform data sources (Azure Key Vault Secrets);
    • Allow passwords retrieved from AWS KMS Secrets;
  • Included positive and negative test cases to ensure the query behaves as expected;
  • Updated dependencies to resolve an SCA vulnerability.

I submit this contribution under the Apache-2.0 license.

@cx-artur-ribeiro cx-artur-ribeiro added the query New query feature label Feb 27, 2025
@cx-artur-ribeiro cx-artur-ribeiro self-assigned this Feb 27, 2025
@github-actions github-actions bot removed the query New query feature label Feb 27, 2025
Copy link
Contributor

github-actions bot commented Feb 27, 2025

kics-logo

KICS version: v2.1.5

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 1
Files parsed placeholder 1
Files failed to scan placeholder 0
Total executed queries placeholder 47
Queries failed to execute placeholder 0
Execution time placeholder 0

@github-actions github-actions bot added query New query feature terraform Terraform query azure PR related with Azure Cloud aws PR related with AWS Cloud labels Mar 6, 2025
@cx-artur-ribeiro cx-artur-ribeiro added bug Something isn't working and removed terraform Terraform query aws PR related with AWS Cloud azure PR related with Azure Cloud labels Mar 6, 2025
@github-actions github-actions bot removed the bug Something isn't working label Mar 6, 2025
@cx-artur-ribeiro cx-artur-ribeiro marked this pull request as ready for review March 6, 2025 07:44
@cx-artur-ribeiro cx-artur-ribeiro requested a review from a team as a code owner March 6, 2025 07:44
@github-actions github-actions bot added terraform Terraform query azure PR related with Azure Cloud labels Mar 6, 2025
@github-actions github-actions bot added the aws PR related with AWS Cloud label Mar 6, 2025
Copy link
Contributor

@cx-eduardo-semanas cx-eduardo-semanas left a comment

Choose a reason for hiding this comment

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

LGTM

cx-rui-araujo
cx-rui-araujo previously approved these changes Mar 13, 2025
Copy link
Contributor

@cx-rui-araujo cx-rui-araujo left a comment

Choose a reason for hiding this comment

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

LGTM

@cx-artur-ribeiro cx-artur-ribeiro merged commit 8104b51 into master Mar 13, 2025
25 checks passed
@cx-artur-ribeiro cx-artur-ribeiro deleted the AST-73206 branch March 13, 2025 16:19
JonasCordsen pushed a commit to JonasCordsen/kics that referenced this pull request Jun 11, 2025
* fix Invalid Media Type Value FP on openAPI query

* fix FP in password and secrets query

* update container package to fix go-jose vulnerability

* add new allow rule to accept type objects without default values

* update test

* fix regex

* fix regex 2

* add positive results to passwords and secrets expected results

* update tests, add 2 regexes instead of one to better tackle the issues - still need refactor

* clear the regex to be more understandable

* clear the regex to be more understandable

* update regex to include type = object optionally

* update regex to include type = object optionally

* add new automation for a new discovered case on positive46.yaml, remove regex that would introduce false negatives

* fix tests and remove negative and positive automation files

* update grpc package

* update golang.org/x/net package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws PR related with AWS Cloud azure PR related with Azure Cloud query New query feature terraform Terraform query
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants