Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-14161

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

    XMLWordPrintable

Details

    Description

      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}(\"|'))?.* 

      Attachments

        Issue Links

          Activity

            People

              8f36004e07e8 Milly Wilson
              ysun Yingran Sun
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: