Skip to content

Vulnerabilities And Secrets Do Not Raise Alerts #1120

Open

Description

@dan-fernandes

The BlueAPI repository has Dependabot, code scanning (via CodeQL) and secret scanning enabled to alert to vulnerabilities.

However, when a branch and associated PR containing a number of such vulnerabilities is created, no alerts are generated.

The vulnerabilities introduced by this PR include:

  1. A plaintext API_KEY global variable
  2. Plaintext username and password global variables
  3. A run_command CLI command which executes un-sanitised input
  4. A download CLI command which wgets un-sanitised input, using code taken from a known CodeQL query.

Acceptance Criteria

  • When code containing "obvious" secrets is pushed to the repo, a secret scanning alert is generated
  • The current CodeQL configuration is checked for best practices
  • (Optional) When a vulnerability known by CodeQL is pushed to the repo, a code scanning alert is generated

Activity

  1. abbiemery commented on Feb 25, 2026

    @abbiemery
    Contributor

    @dan-fernandes Is this covered by the gitleaks lint?

  2. added
    ciPull requests that update GitHub Actions code
    on Feb 25, 2026
  3. dan-fernandes commented on Mar 2, 2026

    @dan-fernandes
    ContributorAuthor

    I've re-created the vulnerabilities PR and got this warning on push:

    $     git push --set-upstream origin 1120-add-critical-vulnerabilities
    Enumerating objects: 45, done.
    Counting objects: 100% (45/45), done.
    Delta compression using up to 22 threads
    Compressing objects: 100% (30/30), done.
    Writing objects: 100% (35/35), 2.92 KiB | 995.00 KiB/s, done.
    Total 35 (delta 23), reused 0 (delta 0), pack-reused 0
    remote: Resolving deltas: 100% (23/23), completed with 8 local objects.
    remote: 
    remote: Create a pull request for '1120-add-critical-vulnerabilities' on GitHub by visiting:
    remote:      https://github.com/DiamondLightSource/blueapi/pull/new/1120-add-critical-vulnerabilities
    remote: 
    remote: GitHub found 1 vulnerability on DiamondLightSource/blueapi's default branch (1 high). To find out more, visit:
    remote:      https://github.com/DiamondLightSource/blueapi/security/dependabot/29
    remote: 
    To github.com:DiamondLightSource/blueapi.git
     * [new branch]          1120-add-critical-vulnerabilities -> 1120-add-critical-vulnerabilities
    branch '1120-add-critical-vulnerabilities' set up to track 'origin/1120-add-critical-vulnerabilities'.
    
  4. dan-fernandes commented on Mar 2, 2026

    @dan-fernandes
    ContributorAuthor

    The PR passes all CI, including CodeQL, so the issue is still open.

    Image
  5. ZohebShaikh commented on Mar 2, 2026

    @ZohebShaikh
    Contributor

    I had a look at CodeQL earlier it is for a different thing and the reason it is passing is we have not added any checks to it.
    And it mostly is used to avoid regression of security vulnerabilities in Application Code. The comment where I have explained this more here

    For gitleaks, The reason it did not flag this was it thought the things that you are adding are false positives more details here

    I have seen gitleaks flag api-key etc

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

    ciPull requests that update GitHub Actions codeneeds confirmationDoes this bug still exist?

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions