You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add detection for sensitive config values in Compose files (#1038)
* draft config detector
* add transformers (may be broken)
* fixed scanner to use detectors
* move into its own function
* added tests for config detector
* revise fn to return a list of types
* make the keyword and high entropy detectors work
* add go mod
* comments for config detector function
* run config detect on env vars in compose file in CLI
* add compose tests
* edit dx message
* edit description of function
* add aws and github detectors
* improve dx message
* fix nil check for value
* update vendorhash
* Delete .vscode/launch.json
* add comments for threshold
* remove package main comment
* fix comma
* added back the json transformer for url_password detector
* Apply suggestions from code review
Co-authored-by: Lio李歐 <[email protected]>
* use fmt to wrap errors instead of errors.New()
* fix compose warnings test data
* change name to sensitive (to not trigger the keyword detector)
* make test become subtests
* use logical expression instead of json to create config
---------
Co-authored-by: Eric Liu <[email protected]>
Co-authored-by: Lio李歐 <[email protected]>
// show warning if sensitive information is detected
211
+
iflen(ds) >0 {
212
+
term.Warnf("service %q: environment %q may contain sensitive information; consider using 'defang config set %s' to securely store this value", svccfg.Name, key, key)
213
+
term.Debugf("service %q: environment %q may contain detected secrets of type: %q", svccfg.Name, key, ds)
! service "configdetection": environment "API_KEY" may contain sensitive information; consider using 'defang config set API_KEY' to securely store this value
2
+
! service "configdetection": environment "AWS_CLIENT_ID" may contain sensitive information; consider using 'defang config set AWS_CLIENT_ID' to securely store this value
3
+
! service "configdetection": environment "GH_PAT" may contain sensitive information; consider using 'defang config set GH_PAT' to securely store this value
4
+
! service "configdetection": environment "HIGH_ENTROPY_STRING" may contain sensitive information; consider using 'defang config set HIGH_ENTROPY_STRING' to securely store this value
5
+
! service "configdetection": environment "MY_URL" may contain sensitive information; consider using 'defang config set MY_URL' to securely store this value
6
+
! service "configdetection": missing memory reservation; using provider-specific defaults. Specify deploy.resources.reservations.memory to avoid out-of-memory errors
0 commit comments