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 Azure Storage detection #2097

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

rgmz
Copy link
Contributor

@rgmz rgmz commented Nov 6, 2023

Description:

This PR tightens up the regex for AccountName+AccountKey and fixes a potential runtime panic when constructing the request.

This PR expands the the Azure storage detector to find many common configurations, not just connection strings. It also adds a bunch of unit tests.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@CLAassistant
Copy link

CLAassistant commented Nov 6, 2023

CLA assistant check
All committers have signed the CLA.

@rgmz rgmz force-pushed the feat/update-azurestorage branch 2 times, most recently from 2069c0d to bd0600b Compare November 6, 2023 13:21
@spydx
Copy link

spydx commented Nov 23, 2023

I would love to see this reach a release. The existing detector, for me, missed many AzureStorage keys that this work here does detect.

@rgmz rgmz force-pushed the feat/update-azurestorage branch 3 times, most recently from 93321d8 to c978fae Compare April 18, 2024 04:39
@rgmz rgmz force-pushed the feat/update-azurestorage branch 8 times, most recently from 9a29cef to 51ce131 Compare June 17, 2024 22:22
@rgmz rgmz marked this pull request as ready for review June 17, 2024 22:22
@rgmz rgmz requested a review from a team as a code owner June 17, 2024 22:22
@rgmz rgmz force-pushed the feat/update-azurestorage branch from 51ce131 to 7a501f4 Compare June 21, 2024 02:52
@rgmz rgmz force-pushed the feat/update-azurestorage branch 2 times, most recently from 9ea1cd5 to 181ae6e Compare July 1, 2024 18:37
@rgmz rgmz force-pushed the feat/update-azurestorage branch from 181ae6e to 2b3eff9 Compare November 3, 2024 14:40
@rgmz rgmz requested a review from a team as a code owner November 3, 2024 14:40
@rgmz rgmz force-pushed the feat/update-azurestorage branch 3 times, most recently from d11e6af to fcb4e31 Compare November 11, 2024 19:20
@rgmz rgmz force-pushed the feat/update-azurestorage branch from fcb4e31 to 7908e8d Compare November 20, 2024 03:13
@rgmz rgmz requested a review from a team as a code owner November 20, 2024 03:13
pkg/detectors/azure_storage/storage.go Show resolved Hide resolved
pkg/detectors/azure_storage/storage.go Outdated Show resolved Hide resolved
pkg/detectors/azure_storage/storage_integration_test.go Outdated Show resolved Hide resolved
pkg/engine/defaults/defaults.go Outdated Show resolved Hide resolved
@rgmz rgmz force-pushed the feat/update-azurestorage branch from 7908e8d to 33669f5 Compare November 20, 2024 21:14
@rgmz rgmz force-pushed the feat/update-azurestorage branch from 33669f5 to 794dc14 Compare November 20, 2024 21:17
@rgmz
Copy link
Contributor Author

rgmz commented Nov 20, 2024

@ahrav Done.

@ahrav ahrav merged commit f19e2c1 into trufflesecurity:main Nov 20, 2024
11 of 13 checks passed
@rgmz rgmz deleted the feat/update-azurestorage branch November 20, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants