@@ -119,6 +119,52 @@ See [RELEASE.md](https://github.com/eea/volto-eea-design-system/blob/master/RELE
119119
120120See [ DEVELOP.md] ( https://github.com/eea/volto-eea-design-system/blob/master/DEVELOP.md ) .
121121
122+ ## Secret Scanning
123+
124+ This repository uses the Betterleaks GitHub Action to scan the current
125+ repository content on every push and pull request. The scan uses the rules in
126+ ` .gitleaks.toml ` and uploads a ` betterleaks-report ` artifact when a finding is
127+ detected.
128+
129+ There are three common outcomes:
130+
131+ 1 . ** Everything is OK.** The ` Betterleaks / Scan for secrets ` check is green and
132+ no action is needed. Regular references to runtime values are OK, for example:
133+
134+ ``` js
135+ const tokenFromCookie = req .universalCookies .get (' auth_token' );
136+ ```
137+
138+ 2 . ** A real secret was found.** The check is red and the workflow log asks you to
139+ download the ` betterleaks-report ` artifact. Open the artifact from the GitHub
140+ Actions run and check the reported file, line and rule. Remove the committed
141+ value, move it to the proper secret store, and rotate it if it was exposed.
142+ A report entry looks like this:
143+
144+ ``` json
145+ {
146+ "RuleID" : " secret-literal-assignment" ,
147+ "File" : " src/config.js" ,
148+ "StartLine" : 12 ,
149+ "Secret" : " [REDACTED]"
150+ }
151+ ```
152+
153+ 3 . ** The finding is a false positive.** Keep the value only if it is clearly not
154+ sensitive, such as a test fixture, placeholder, or public example. Add
155+ ` betterleaks:allow ` on the same line and include a short explanation in the
156+ pull request.
157+
158+ ``` js
159+ const testPassword = ' admin' ; // betterleaks:allow
160+ ```
161+
162+ ``` yaml
163+ password : " admin" # betterleaks:allow
164+ ` ` `
165+
166+ Do not add ` betterleaks:allow` to real credentials.
167+
122168# # Copyright and license
123169
124170The Initial Owner of the Original Code is European Environment Agency (EEA).
0 commit comments