ci: fix CodeQL/daily schedule and add workflow_dispatch#44890
Closed
ci: fix CodeQL/daily schedule and add workflow_dispatch#44890
Conversation
Agent-Logs-Url: https://github.com/envoyproxy/envoy/sessions/aab8396b-304f-4c89-bd5d-6f8f53f1c846 Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update CodeQL workflow to run daily and add manual trigger
ci: fix CodeQL/daily schedule and add workflow_dispatch
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
codeql-daily.ymlwas named "daily" but ran weekly (Thursdays only), and had noworkflow_dispatchtrigger — making it impossible to manually re-run the analysis on demand (e.g. to auto-close a false-positive alert without waiting up to a week).Changes
on.schedule:0 12 * * 4→0 12 * * *(actually daily at 12:00 UTC)on.workflow_dispatch: added (no inputs) to enable manual runs from the Actions UINote: the manual-trigger button only appears after this merges to
main.Original prompt
Summary
The
CodeQL/dailyworkflow at.github/workflows/codeql-daily.ymlis named "daily" but its cron schedule is actually weekly (Thursdays at 12:00 UTC). It also lacks aworkflow_dispatchtrigger, which means there is no way to manually run it from the Actions UI. This makes it slow/impossible to re-run the analysis on demand — for example, after fixing a CodeQL false-positive (such as alert #1881 forcpp/new-free-mismatchin<vector>) we have to wait up to a week for the next scheduled run before the alert auto-closes.Changes required
Edit
.github/workflows/codeql-daily.ymlonly. Two changes to theon:block:Change the cron from weekly to daily.
Add
workflow_dispatch:with no inputs so the workflow can be manually triggered from the Actions UI.That is the entire change. Do not modify any other steps, jobs, permissions, or the
codeql-push.ymlworkflow.Acceptance criteria
.github/workflows/codeql-daily.ymlon:block contains bothschedule(withcron: '0 12 * * *') andworkflow_dispatch:.yamllintoractionlintif available).name:("CodeQL/daily"), permissions, concurrency, and job definition are left unchanged.Notes
scheduleandworkflow_dispatchtriggers only take effect once the workflow file is on the default branch (main), so the manual-run button will appear after this PR merges.Install depsreferencing alert ssl: update BoringSSL to ae9f0616 (3202). #1881 untouched.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: this one is super fucking annoying
we have tried now like 10 different things to make it go away but still it persists
rn i just want to know - what is actually triggering this - how do i get that piece of information - the report is useless
Assistant: Short answer: the UI is showing you the primary sink location (the
deletecall inside libc++'svectorheader at line 492 — that's__vallocate/__deallocate_nodeterritory). The piece you actually want — the matchingnew/mallocsite in your code — is in the SARIF result'srelatedLocations/codeFlows, which the GitHub UI for this query basically hides because the primary location lives in a header that isn't in the repo (hence "Preview unavailable").The Code Scanning REST API endpoints for a single alert and its instances aren't exposed through my tooling here, but here's how you get it yourself.
How to get the actual triggering location
Option 1 — Pull the alert via the REST API (fastest)
That gives you the primary location only. To get all locations for the most recent instance (this is the important one):
The instance object includes
message.textwhich forcpp/new-free-mismatchis rendered as:Each
[here]is a placeholder backed by an entry — but the REST API's instance payload only returns the primary location. To get the related/secondary locations and the data flow path you need SARIF.Option 2 — Download the SARIF (this is what you actually want)
relatedLocationsandcodeFlows:relatedandflowsare what tell you the actualnew/mallocsite — i.e. the line in Envoy code that allocated the memory whose deallocation insidevector:492is being flagged.Option 3 — Run CodeQL locally and use the path-problem viewer
Since this is a `path...
This pull request was created from Copilot chat.