René's URL Explorer Experiment


Title: Include diagnostics in failed SARIF if they were created before a database was initialised by mbg · Pull Request #4223 · github/codeql-action · GitHub

Open Graph Title: Include diagnostics in failed SARIF if they were created before a database was initialised by mbg · Pull Request #4223 · github/codeql-action

X Title: Include diagnostics in failed SARIF if they were created before a database was initialised by mbg · Pull Request #4223 · github/codeql-action

Description: Diagnostics are typically written to the database cluster and are then included in the SARIF that is generated by the CLI. However, in the CodeQL Action we may produce diagnostics before the database cluster is initialised. To work around this, we have so far relied on tracking diagnostics in memory that were created before the database cluster is ready. After the cluster is initialised, those diagnostics are then flushed to disk. However, this represents a problem if the database cluster is never successfully initialised. This PR changes this so that diagnostics are written directly to a temporary directory on disk if the database cluster is not yet ready. They are then moved to the database cluster once it is initialised. If the cluster is never initialised, then we point the CLI at the temporary directory on disk using a --diagnostic-dir argument. The CLI will then pick up any diagnostics that are still in that location and include them in the failed SARIF. Risk assessment For internal use only. Please select the risk level of this change: Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only. Which use cases does this change impact? Workflow types: Advanced setup - Impacts users who have custom CodeQL workflows. Managed - Impacts users with dynamic workflows (Default Setup, Code Quality, ...). Products: Code Scanning - The changes impact analyses when analysis-kinds: code-scanning. Code Quality - The changes impact analyses when analysis-kinds: code-quality. Other first-party - The changes impact other first-party analyses. Environments: Dotcom - Impacts CodeQL workflows on github.com and/or GitHub Enterprise Cloud with Data Residency. GHES - Impacts CodeQL workflows on GitHub Enterprise Server. How did/will you validate this change? Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files). End-to-end tests - I am depending on PR checks (i.e. tests in pr-checks). If something goes wrong after this change is released, what are the mitigation and rollback strategies? Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix. How will you know if something goes wrong after this change is released? Telemetry - I rely on existing telemetry or have made changes to the telemetry. Dashboards - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release. Alerts - New or existing monitors will trip if something goes wrong with this change. Are there any special considerations for merging or releasing this change? No special considerations - This change can be merged at any time. Merge / deployment checklist Confirm this change is backwards compatible with existing workflows. Consider adding a changelog entry for this change. Confirm the readme and docs have been updated if necessary.

Open Graph Description: Diagnostics are typically written to the database cluster and are then included in the SARIF that is generated by the CLI. However, in the CodeQL Action we may produce diagnostics before the databa...

X Description: Diagnostics are typically written to the database cluster and are then included in the SARIF that is generated by the CLI. However, in the CodeQL Action we may produce diagnostics before the databa...

Opengraph URL: https://github.com/github/codeql-action/pull/4223

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:3aad370e-6e5f-085b-d98a-bc7aae5f92ea
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id894C:34E7AF:561932:705543:6AED291E
html-safe-nonce69fd41264f61ff29345e2232cc63cb87cabdce6dbb3bd3dfacf426922b80f20b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTRDOjM0RTdBRjo1NjE5MzI6NzA1NTQzOjZBRUQyOTFFIiwidmlzaXRvcl9pZCI6IjIxOTI4NjYyMTU1Njg2ODEyNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac778dd385619c0e88c46f9b8d85ed80b4a05b6904defa3feca7ff4811ff66c45c
hovercard-subject-tagpull_request:4806543702
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/github/codeql-action/pull/4223/files
twitter:imagehttps://avatars.githubusercontent.com/u/278086?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/278086?s=400&v=4
og:image:altDiagnostics are typically written to the database cluster and are then included in the SARIF that is generated by the CLI. However, in the CodeQL Action we may produce diagnostics before the databa...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9d95365dda0576efe9b71f45807595e396bd0ca9286fba5367a05048e6ddf8f2
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql-action git https://github.com/github/codeql-action.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id259445878
octolytics-dimension-repository_nwogithub/codeql-action
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id259445878
octolytics-dimension-repository_network_root_nwogithub/codeql-action
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release98b41fa4b5635ceb45a4c54320fced73817ff290
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql-action/pull/4223/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql-action%2Fpull%2F4223%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql-action%2Fpull%2F4223%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=github%2Fcodeql-action
Reloadhttps://github.com/github/codeql-action/pull/4223/files
Reloadhttps://github.com/github/codeql-action/pull/4223/files
Reloadhttps://github.com/github/codeql-action/pull/4223/files
githubhttps://github.com/github
codeql-actionhttps://github.com/github/codeql-action
Codehttps://github.com/github/codeql-action
Issues165 (165)https://github.com/github/codeql-action/issues
Pull requests41 (41)https://github.com/github/codeql-action/pulls
Actionshttps://github.com/github/codeql-action/actions
Security and quality2 (2)https://github.com/github/codeql-action/security
Insightshttps://github.com/github/codeql-action/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql-action%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql-action%2Fissues%2Fnew%2Fchoose
mbghttps://github.com/mbg
mainhttps://github.com/github/codeql-action/tree/main
mbg/diagnostics/failed-sarifhttps://github.com/github/codeql-action/tree/mbg/diagnostics/failed-sarif
Conversation 45 https://github.com/github/codeql-action/pull/4223
Commits 21 https://github.com/github/codeql-action/pull/4223/commits
Checks 229 https://github.com/github/codeql-action/pull/4223/checks
Files changed https://github.com/github/codeql-action/pull/4223/files
Please reload this pagehttps://github.com/github/codeql-action/pull/4223/files
Include diagnostics in failed SARIF if they were created before a database was initialised https://github.com/github/codeql-action/pull/4223/files#top
Show all changes 21 commits https://github.com/github/codeql-action/pull/4223/files
56e0d42 Refactor `writeDiagnosticFile` out of `writeDiagnostic` mbg Oct 9, 2026 https://github.com/github/codeql-action/pull/4223/commits/56e0d42f6883e74367a0e168af4fc698e811f7f3
f422d8a Write diagnostics to temporary location when database isn't ready mbg Oct 9, 2026 https://github.com/github/codeql-action/pull/4223/commits/f422d8a87420c3165a94b7c414f607689f171b1e
67f2591 Make diagnostics less dependent on global state mbg Oct 9, 2026 https://github.com/github/codeql-action/pull/4223/commits/67f25913cb2ea1d22dc93c6cf9169b570387c15b
64723df Use temporary diagnostic dir in `generateFailedSarif` mbg Oct 9, 2026 https://github.com/github/codeql-action/pull/4223/commits/64723df932ef37cffa7dab62abf807484a079d07
581a0e1 Refactor `writeTemporaryDiagnosticFile` out of `add[NoLanguage]Diagno… mbg Oct 12, 2026 https://github.com/github/codeql-action/pull/4223/commits/581a0e148ec5728a67211b30328c100a6e28894d
ba569ac Omit `--sarif-codescanning-config` if the config file doesn't exist mbg Oct 16, 2026 https://github.com/github/codeql-action/pull/4223/commits/ba569ac626d7a9c07b266134ee00281f678593ab
b963054 Add e2e test mbg Oct 12, 2026 https://github.com/github/codeql-action/pull/4223/commits/b963054f39f4598d33d386cb17f34bb786778400
8357829 Use same sub-path in `getDiagnosticsPath` for no language case mbg Oct 21, 2026 https://github.com/github/codeql-action/pull/4223/commits/8357829c18a93705759e3a6bbe5d787615081e87
d7bad7d Merge remote-tracking branch 'origin/main' into mbg/diagnostics/faile… mbg Oct 21, 2026 https://github.com/github/codeql-action/pull/4223/commits/d7bad7d923f3eb5e3158494f53f1495a62566da4
98b8e51 Always check whether config file exists mbg Oct 21, 2026 https://github.com/github/codeql-action/pull/4223/commits/98b8e51380c9bb16f7d21a67486a64d853b3544f
4707994 Don't include diagnostics if FF is off mbg Oct 21, 2026 https://github.com/github/codeql-action/pull/4223/commits/4707994e6e9979b210fcf8fc655fac8b5665b670
67cd8c1 Rename env var to `DIAGNOSTICS_DIR` mbg Oct 21, 2026 https://github.com/github/codeql-action/pull/4223/commits/67cd8c12d4e80909882f0c440b46b9a4dcf0dd17
a83f6f5 Update skipped `analyze` step comment mbg Oct 21, 2026 https://github.com/github/codeql-action/pull/4223/commits/a83f6f50cda0c5daf29cd4fb6020a4078972db51
c3f2a34 Clarify comment that explains how the test works mbg Oct 21, 2026 https://github.com/github/codeql-action/pull/4223/commits/c3f2a34e23c03c1251cdf0b53376c626a69582de
26f5c5e Improve logging and error handling in `logTemporaryDiagnostics` mbg Oct 22, 2026 https://github.com/github/codeql-action/pull/4223/commits/26f5c5e4e0aaac24bf3f31e064343e3229fbbec6
308d941 Only warn for missing config if `init` was successful mbg Oct 22, 2026 https://github.com/github/codeql-action/pull/4223/commits/308d941317ce1303e8645e9ede2606deedcdc825
b79966a Clean up path functions in `diagnostics.ts` and add some tests mbg Oct 22, 2026 https://github.com/github/codeql-action/pull/4223/commits/b79966a8eed1b74372dee8aeba5d983c4e29f2d2
2d0d1c1 Merge branch 'main' into mbg/diagnostics/failed-sarif mbg Oct 22, 2026 https://github.com/github/codeql-action/pull/4223/commits/2d0d1c1dcd91816356de8432bd21ca52e0c4fa2a
ac509b6 Merge branch 'main' into mbg/diagnostics/failed-sarif mbg Oct 22, 2026 https://github.com/github/codeql-action/pull/4223/commits/ac509b698f00ba148347a7517e7ac8bf6e07e23f
87da5f3 Improve wording to address review feedback mbg Oct 22, 2026 https://github.com/github/codeql-action/pull/4223/commits/87da5f37e5ca8a74af34c39cfd0558dd4fdc5eb9
5196bae Merge remote-tracking branch 'origin/main' into mbg/diagnostics/faile… mbg Oct 22, 2026 https://github.com/github/codeql-action/pull/4223/commits/5196baec0102c00fdc1695e7363bd78c66dc6d27
Clear filters https://github.com/github/codeql-action/pull/4223/files
Please reload this pagehttps://github.com/github/codeql-action/pull/4223/files
Please reload this pagehttps://github.com/github/codeql-action/pull/4223/files
__diagnostics-without-db.yml https://github.com/github/codeql-action/pull/4223/files#diff-6f7bf0468e2dfc21efc8d24702e2d073c288aee1ef41ad921a9c7f0cf011abc8
__submit-sarif-failure.yml https://github.com/github/codeql-action/pull/4223/files#diff-4507ceefb9a79cef5a3b3fb78f21d48bc6a8b79da48c34e89f9cea4ea69bc159
entry-points.js https://github.com/github/codeql-action/pull/4223/files#diff-73697317a7dd14441dcfb24bc586f637ae2b815b5e503a05a81816be74fcd815
check-diagnostics.ts https://github.com/github/codeql-action/pull/4223/files#diff-a8dfb18b71bda2d2e90acdb16019838d4fa9108a3e27125cab639eb856624780
diagnostics-without-db.yml https://github.com/github/codeql-action/pull/4223/files#diff-6768ec5d12eb13b19e420f5263362feec04587f0bdc8c101afc6d75c5f025fcb
submit-sarif-failure.yml https://github.com/github/codeql-action/pull/4223/files#diff-98cd2a4619b9f84a4352d40ae98426aeda704d3e8b7756686a2e81d905746337
diagnostics-without-db.ts https://github.com/github/codeql-action/pull/4223/files#diff-898534d356a5e84ea23ba5db6c82710f850cc7d32b55c86f183182b7ec14e476
sync.ts https://github.com/github/codeql-action/pull/4223/files#diff-5b22528f10341e3c06cb28309cc814aaabb620eb17be5edd6aa9bbe94d1677ae
codeql.ts https://github.com/github/codeql-action/pull/4223/files#diff-473ad8cf33ad034dc4f9ae468a3ce5d87106ace4f96f6a23a000261d46efaa60
config-utils.ts https://github.com/github/codeql-action/pull/4223/files#diff-14691739edd81c7a3c8a30fec2e77ee99f2d57f323523e502a73ab375982d6fa
action-config.ts https://github.com/github/codeql-action/pull/4223/files#diff-02ca039690a86135f56a568e2c8b73ce7cc89d86d86717b5832616af0594980c
db-config.test.ts https://github.com/github/codeql-action/pull/4223/files#diff-ba12aaa1fc4def7c73526f07f752661695230fef982cf09913478e22b0cba93f
diagnostics.test.ts https://github.com/github/codeql-action/pull/4223/files#diff-d66e0861947cd46f4c67f83e1af3c2636b55ce0c9a69a118801ef70e7a71f922
diagnostics.ts https://github.com/github/codeql-action/pull/4223/files#diff-da8cc70370d67b4c482d5cf755fb7f45697844107dd73ccf7f5b54162703f63c
init-action-post-helper.test.ts https://github.com/github/codeql-action/pull/4223/files#diff-62c5bc1fe681a41f34d74ef117f4aa52ae21023a6f78abe2655e635afa48b08a
init-action-post-helper.ts https://github.com/github/codeql-action/pull/4223/files#diff-b5d09ae3a926294c25f263fe282f10168d52ee21a08447eade997108a11523bd
init-action.ts https://github.com/github/codeql-action/pull/4223/files#diff-87bf9e0a2a9244ba1f26eb01d404deaccbc9580479d2e2530a4ff2fd5bd91565
setup-codeql.test.ts https://github.com/github/codeql-action/pull/4223/files#diff-f306d28dd1b1b19631643393e111cbf6e6dad30ad83d9eca67f08a64e5e8c324
testing-utils.ts https://github.com/github/codeql-action/pull/4223/files#diff-b5e75f890eca9e7fbfff472427b39ce0f5628833109b50e7b2d165729bd8c124
util.ts https://github.com/github/codeql-action/pull/4223/files#diff-3294a832ea2276e554177e0b3007cc2d401c082912c7fbde49fa09141bf1aed1
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
.github/workflows/__diagnostics-without-db.ymlhttps://github.com/github/codeql-action/pull/4223/files#diff-6f7bf0468e2dfc21efc8d24702e2d073c288aee1ef41ad921a9c7f0cf011abc8
View file https://github.com/github/codeql-action/blob/5196baec0102c00fdc1695e7363bd78c66dc6d27/.github/workflows/__diagnostics-without-db.yml
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/4223/files
https://github.com/github/codeql-action/blob/main/CODEOWNERS#L1
.github/workflows/__submit-sarif-failure.ymlhttps://github.com/github/codeql-action/pull/4223/files#diff-4507ceefb9a79cef5a3b3fb78f21d48bc6a8b79da48c34e89f9cea4ea69bc159
View file https://github.com/github/codeql-action/blob/5196baec0102c00fdc1695e7363bd78c66dc6d27/.github/workflows/__submit-sarif-failure.yml
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/github/codeql-action/pull/4223/files
Please reload this pagehttps://github.com/github/codeql-action/pull/4223/files
Please reload this pagehttps://github.com/github/codeql-action/pull/4223/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.