Skip to content
Snippets Groups Projects
Commit c89076e2 authored by Jose Raul Barreras's avatar Jose Raul Barreras
Browse files

improve doc

parent 3094f8d1
No related branches found
No related tags found
4 merge requests!34develop to master,!18sync dependency-check with secrets-detection,!17Resolve "Add Dependency Check",!16Resolve "Add Automated Secrets Detection"
This commit is part of merge request !17. Comments created here will be created in the context of that merge request.
......@@ -27,4 +27,4 @@ This file is automatically updated after execute `git commit` based on the conte
- its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:python
_Last update: Thu May 30 17:47:26 CDT 2019_
_Last update: Thu May 30 17:57:56 CDT 2019_
......
# Secrets detection example
# Secrets detection example
## Parameters
......@@ -22,3 +22,23 @@ variables:
script:
- docker run --rm -v "${PWD}:/work" -w /work its-registry.unl.edu/unl-its/docker-ci/detect-secrets -s -e 4.5
```
# Inline Allowlisting
To tell detect-secrets to ignore a particular line of code, simply append an inline pragma: allowlist secret comment. For example:
API_KEY = "blah-blah-but-actually-not-secret" # pragma: allowlist secret
print('hello world')
Inline commenting syntax for a multitude of languages is supported:
| Comment Style | Language Support |
| :------------ | :-------------- |
|# | e.g. Python, Dockerfile, YAML |
|// | e.g. Go, C++, Java |
|/* */ | e.g. C, Java |
|' | e.g. Visual Basic .NET |
| -- | e.g. SQL, Haskell |
| <!-- --!> | e.g. XML |
This may be a convenient way for you to allowlist secrets, without having to regenerate the entire baseline again. Furthermore, this makes the allowlisted secrets easily searchable, auditable, and maintainable.
_[source](https://github.com/Yelp/detect-secrets#secrets-baseline)_
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment