Secret scanning matches on entire line instead of matching on any part of a line

XMLWordPrintable

    • Severity 2 - Major

      Issue Summary

      Secret scanning matches on entire line instead of matching on any part of a line

      Steps to Reproduce

      1. Push a secret that is wrapped by other characters e.g.:
        text before 'Basic TA6QW9uT25lRGV2b3BzQTA6QW9uT25lRGV2b3BzQ==' text after

      Expected Results

      Secret is detected and users are notified

      Actual Results

      The secret is not picked up and there are no notifications 

      Workaround

      Add `.*` to the secret line pattern rule e.g. 

       .*(\"|')?Basic ([A-Za-z0-9\\+=]{44}(\"|'))?.* 

            Assignee:
            Milly Wilson
            Reporter:
            Yingran Sun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: