Skip to content

[BUG] Running with docker image generates empty baseline file #131

@cyrusfurtado

Description

@cyrusfurtado

Describe the bug
Running the docker image of the tool generates a .secrets.baseline file with an empty result for the secrets.

To reproduce
Steps to reproduce the behavior

  1. Switch to the directory where you need to run the tool
  2. Run detect-secrets scan --update .secrets.baseline --exclude-files="go.sum"
  3. Check the generated .secrets.baseline json file. The result property will have some entries.
"results": {
    "src/go/stream/stream.go": [
      {
        "hashed_secret": "524a8fbb68e4f36499a8300890f82558f64cc61d",
        "is_verified": false,
        "line_number": 76,
        "type": "Secret Keyword",
        "verified_result": null
      }
    ]
  },
  "version": "0.13.1+ibm.60.dss",
  1. Run docker run -it --rm -v $(pwd):/code icr.io/git-defenders/detect-secrets:redhat-ubi scan --update .secrets.baseline --exclude-files="go.sum"
  2. Check the updated .secrets.baseline json file. It will have an empty result property.
"results": {},
  "version": "0.13.1+ibm.61.dss",

Screenshots
Local tool run
secrets-local

Docker container run
secrets-container

Impact
High

Additional context:

  • Host or local: local
  • Operating System: Red Hat Enterprise Linux 8.7 (Ootpa)
  • Languages scanned: GoLang
  • Repo & build context links: N/A
  • Log output: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions