Skip to content

Some rules ARE NO LONGER detected by pipeline secret detection when using a custom ruleset

Summary

  • AWS keys ARE detected with a regular/standard secret detection pipeline - MR7
  • AWS keys ARE NOT detected when using a custom ruleset (extend the default ruleset with a local ruleset) - merged MR8, the following MRs are based off of that
    • Changing the order of keys doesn't change anything - MR10, MR11
    • Having only the AWS key doesn't change anything - MR13
    • Having a different custom rule doesn't change anything - MR12
    • Using the MR pipeline template didn't help - MR14

What is the current bug behavior?

AWS keys are not being detected by pipeline secret detection when using a custom ruleset to extend the default ruleset with a local ruleset. So far, only AWS keys are observed to not be detected, but exhaustive testing would need to be done to determine if there are others that aren't detected. Of note, there are other keys/secret types that are being detected.

Addendum

5 SSH private keys (RSA,DSA,EC,OPENSSH,PKCS8) have also been reported to stop working, while Slack rules keep working when using a custom ruleset.

GCP API keys are also impacted. The string AIzaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA can be used to test this.

In version 5.1.15 of the analyzer, detection works as expected when using a custom ruleset, but breaks in versions after that.

What is the expected correct behavior?

Using a custom ruleset to extend the default ruleset with a local ruleset should not impact the detection of existing secret types.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

Edited by rossfuhrman