Skip to content

Commit

Permalink
Detect secrets GitHub action (#194)
Browse files Browse the repository at this point in the history
* detect-secrets github action

* update .secrets.baseline with secrets from ldap-custom-ssl-secret.yaml and openldap-customldif.yaml

* run the github action on push only (not pull_request)

---------

Co-authored-by: Frederic Mercier <[email protected]>
  • Loading branch information
fredmerci and Frederic Mercier authored Aug 27, 2024
1 parent 7d4975f commit dda93d7
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/detect-secrets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: detect secrets

on: push

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "detect-secrets"
detect-secrets:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# Checks-out your repository under ${{github.workspace}}, so your job can access it
- uses: actions/checkout@v4

- name: scan all the files (not just the ones committed), generate a report, and check that there are no actual or potential secret
run: |
docker run --pull=always -a stdout \
-v ${{github.workspace}}:/code \
--entrypoint /bin/sh \
icr.io/git-defenders/detect-secrets:0.13.1.ibm.61.dss-redhat-ubi \
-c "detect-secrets --version;
detect-secrets scan --all-files --exclude-files "^.git/.*" --update .secrets.baseline;
detect-secrets audit --report --fail-on-unaudited --fail-on-live --fail-on-audited-real .secrets.baseline"
40 changes: 38 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"exclude": {
"files": "openldap-customldif.yaml|ldap-custom-ssl-secret.yaml|^.secrets.baseline$",
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2024-08-09T09:14:16Z",
"generated_at": "2024-08-27T06:40:44Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -307,6 +307,42 @@
"verified_result": null
}
],
"authentication/Keycloak/openldap/ldap-custom-ssl-secret.yaml": [
{
"hashed_secret": "470bf8b666f65eb413930e55a2153b2e6d6334b0",
"is_secret": false,
"is_verified": false,
"line_number": 8,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "641ad3b66231e0f477088e711306cd1fdf1e5626",
"is_secret": false,
"is_verified": false,
"line_number": 11,
"type": "Base64 High Entropy String",
"verified_result": null
},
{
"hashed_secret": "03b4a6482aeaf6e6aa3c2639db6e1c9b728e7b49",
"is_secret": false,
"is_verified": false,
"line_number": 13,
"type": "Base64 High Entropy String",
"verified_result": null
}
],
"authentication/Keycloak/openldap/openldap-customldif.yaml": [
{
"hashed_secret": "3e6e3eece5e10a4c903489f501c049b2c54094c4",
"is_secret": false,
"is_verified": false,
"line_number": 8,
"type": "Base64 High Entropy String",
"verified_result": null
}
],
"authentication/Keycloak/openldap/openldap-secret.yaml": [
{
"hashed_secret": "e6c016ec485da2332894dc2ec7a6dc51274329ca",
Expand Down

0 comments on commit dda93d7

Please sign in to comment.