IBM / detect-secrets

An enterprise friendly way of detecting and preventing secrets in code.
Apache License 2.0
74 stars 46 forks source link

Report wording update: --fail-on-unaudited #91

Closed victoria-miltcheva closed 2 years ago

victoria-miltcheva commented 2 years ago

Description

Report output changes Only unaudited secrets found:


10 potential secrets in .secrets.baseline were reviewed. Found 1 unaudited secret.

Failed Condition    Secret Type    Filename                                 Line
------------------  -------------  -------------------------------------  ------
Unaudited           Private Key    detect_secrets/plugins/private_key.py      48

Failed conditions:

        - Unaudited secrets were found

                Run detect-secrets audit .secrets.baseline, and audit all potential secrets.

                It is recommended to configure the pre-commit hook for your project: https://github.com/IBM/detect-secrets/blob/master/docs/developer-tool-faqmd#how-do-i-set-up-the-pre-commit-hook - it automatically scans your code for secrets and blocks local commits if potential secrets are found.

                The --fail-on-unaudited option can be added to your pre-commit config file to prevent unaudited secrets from being committed locally: https://github.com/IBM/detect-secrets/blob/master/docs/cheat-sheetmd#fail-pre-commit-if-there-are-non-audited-entries

For additional help, run detect-secrets audit --help.

All conditions failed:


10 potential secrets in .secrets.baseline were reviewed. Found 1 live secret, 1 unaudited secret and 1 secret that was audited as real.

Failed Condition    Secret Type    Filename                                 Line
------------------  -------------  -------------------------------------  ------
Live                Private Key    detect_secrets/plugins/private_key.py      45
Unaudited           Private Key    detect_secrets/plugins/private_key.py      48
Audited as real     Private Key    detect_secrets/plugins/private_key.py      46

Failed conditions:

        - Unaudited secrets were found

                Run detect-secrets audit .secrets.baseline, and audit all potential secrets.

                It is recommended to configure the pre-commit hook for your project: https://github.com/IBM/detect-secrets/blob/master/docs/developer-tool-faqmd#how-do-i-set-up-the-pre-commit-hook - it automatically scans your code for secrets and blocks local commits if potential secrets are found.

                The --fail-on-unaudited option can be added to your pre-commit config file to prevent unaudited secrets from being committed locally: https://github.com/IBM/detect-secrets/blob/master/docs/cheat-sheetmd#fail-pre-commit-if-there-are-non-audited-entries

        - Live secrets were found

                Revoke all live secrets and remove them from the codebase. Afterwards, run detect-secrets scan --update .secrets.baseline to re-scan.

        - Audited true secrets were found

                If any active secrets meet this condition, revoke them. Then, remove secrets that were audited as real from the codebase and run detect-secrets scan --update .secrets.baseline to re-scan.

For additional help, run detect-secrets audit --help.