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

add exceptions for generic credential rulefor Elasticsearch/Opensea… #86

Merged
merged 3 commits into from
Dec 7, 2023

Conversation

markdboyd
Copy link
Contributor

@markdboyd markdboyd commented Dec 5, 2023

Changes proposed in this pull request:

The generic-credential rule was flagging lines as containing secrets like these due to the words keyword, key, or hostname:

https://github.com/cloud-gov/logsearch-for-cloudfoundry/blob/develop/jobs/upload-kibana-objects/templates/kibana-objects/index-pattern/logs.json.erb#L221
https://github.com/cloud-gov/logsearch-for-cloudfoundry/blob/develop/jobs/upload-kibana-objects/templates/kibana-objects/search/app-all-errors.json.erb#L29
https://github.com/cloud-gov/logsearch-for-cloudfoundry/blob/develop/jobs/upload-kibana-objects/templates/kibana-objects/index-pattern/logs.json.erb#L134

Obviously these lines don't actually contain secrets, so I updated the rule to ignore matched secrets that match these regexes:

  • \"type\":\"keyword\", so containing `"type": "keyword" in the matched secret
  • \"name\":\".*hostname\", so containing `"name":"hostname" in the matched secret

security considerations

We are making legitimate exceptions to one of our rules for detecting secrets

@markdboyd markdboyd requested a review from a team December 5, 2023 22:44
JasonTheMain
JasonTheMain previously approved these changes Dec 5, 2023
Copy link

@JasonTheMain JasonTheMain 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 to me mark

@markdboyd markdboyd merged commit cc0e3ea into main Dec 7, 2023
2 checks passed
@markdboyd markdboyd deleted the add-generic-credential-exceptions branch December 7, 2023 14:34
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.

3 participants