Skip to content

Tesoro fails to reveal references that are inside a file #30

Description

@ademariag

Describe the bug/feature
Tesoro fails to detect and reveal secrets embedded into other strings

kind: Secret
metadata:
  labels:
    name: bug-report
    tesoro.kapicorp.com: enabled
  name: bug-report
stringData:
  not_work: does not work ?{base64:eyJkYXRhIjogIk4wOTRlbE5XTlZWalFVZzRWblJKVTBscVpWWXpTVkZYV2pGWFVVOVViV1JSWlRFeFFYWlNhbVJuU1E9PSIsICJlbmNvZGluZyI6ICJvcmlnaW5hbCIsICJ0eXBlIjogImJhc2U2NCJ9:embedded}
  works: ?{base64:eyJkYXRhIjogIk4wOTRlbE5XTlZWalFVZzRWblJKVTBscVpWWXpTVkZYV2pGWFVVOVViV1JSWlRFeFFYWlNhbVJuU1E9PSIsICJlbmNvZGluZyI6ICJvcmlnaW5hbCIsICJ0eXBlIjogImJhc2U2NCJ9:embedded}

results in:

{
  "not_work": "ZG9lcyBub3Qgd29yayA/e2Jhc2U2NDpleUprWVhSaElqb2dJazR3T1RSbGJFNVhUbFpXYWxGVlp6UldibEpLVlRCc2NWcFdXWHBUVmtaWVYycEdXRlZWT1ZWaVYxSlNXbFJGZUZGWVdsTmhiVkp1VTFFOVBTSXNJQ0psYm1OdlpHbHVaeUk2SUNKdmNtbG5hVzVoYkNJc0lDSjBlWEJsSWpvZ0ltSmhjMlUyTkNKOTplbWJlZGRlZH0=",
  "works": "N094elNWNVVjQUg4VnRJU0lqZVYzSVFXWjFXUU9UbWRRZTExQXZSamRnSQ=="
}

with annotations

k get secret/bug-report -o yaml | yq -r .metadata.annotations.'"tesoro.kapicorp.com/revealed"'
["/data/works"]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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