Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve secret detection heuristics #4289

Merged
merged 16 commits into from
Oct 30, 2024
Merged

Conversation

theunrepentantgeek
Copy link
Member

@theunrepentantgeek theunrepentantgeek commented Sep 22, 2024

What this PR does / why we need it:

We've noticed a significant number of properties that should have been flagged as secrets, but which weren't noticed earlier. In this PR, we're improving our secret detection heuristics to try and prevent this from happening in the future.

Closes #4269
 
Special notes for your reviewer:

This detected a number of issues, which I think I've resolved correctly, but this needs a careful check.

Blocked on merge of #4237 and this will likely require a rebase after that one merges.

How does this PR make you feel:
gif

v2/azure-arm.yaml Outdated Show resolved Hide resolved
v2/api/insights/customizations/component_extensions.go Outdated Show resolved Hide resolved
v2/azure-arm.yaml Outdated Show resolved Hide resolved
@matthchr matthchr modified the milestones: v2.10.0, v2.11.0 Oct 23, 2024
v2/azure-arm.yaml Show resolved Hide resolved
@@ -2554,6 +2598,9 @@ objectModelConfiguration:
Databricks:
ResourceId:
$armReference: true
DatabricksProperties:
DatabricksAccessToken:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Breaking change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup.

Copy link
Member

Choose a reason for hiding this comment

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

Where are the associated code-generated changes for this?

I only see 2 files in this PR now?

Copy link
Member Author

Choose a reason for hiding this comment

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

This isn't new - it's relocated from just below - we're supposed to have things in alphabetical order, so I moved it up into place. That's why there's no change to generated code.

@@ -2587,6 +2634,9 @@ objectModelConfiguration:
DatabricksProperties:
DatabricksAccessToken:
$isSecret: true
VirtualMachineSshCredentials_STATUS:
PrivateKeyData:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This shouldn't be included in the STATUS?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct.

Copy link
Member

@matthchr matthchr left a comment

Choose a reason for hiding this comment

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

Looks good except that I was expecting generated code changes which I don't see now?

Most of the changes are marking false-positives as not secrets but there is one new secret, right? Where is it in the generated code?

@@ -2554,6 +2598,9 @@ objectModelConfiguration:
Databricks:
ResourceId:
$armReference: true
DatabricksProperties:
DatabricksAccessToken:
Copy link
Member

Choose a reason for hiding this comment

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

Where are the associated code-generated changes for this?

I only see 2 files in this PR now?

@matthchr matthchr disabled auto-merge October 29, 2024 17:00
@theunrepentantgeek theunrepentantgeek added this pull request to the merge queue Oct 30, 2024
Merged via the queue into main with commit bd7fc44 Oct 30, 2024
7 checks passed
@theunrepentantgeek theunrepentantgeek deleted the improve/secret-detection branch October 30, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Include "Token" in the generator secret check heuristic
3 participants