Repository navigation
Conversation
chore: back-merge main into develop
CodeQL runs the security-and-quality suite over javascript-typescript and actions on every push to main or develop, on every pull request, and weekly. Neither extractor compiles anything, so the matrix costs a few minutes. The actions extractor is the one that earns its keep here: it reads the workflow files themselves and flags script injection in `run:` blocks, which the release pipeline has a lot of surface for. Rust gets a second job, advisory only and only on pushes to develop. Its extractor is newer than the others and the workspace links a webview, so a failure there says more about the extractor than about the code: both CodeQL steps are continue-on-error and a trailing step turns a failure into a warning annotation, which keeps the job from ever gating a merge while still making a silently-broken scan visible. Neither job checks out examples/test-repo. It is a fixture whose contents are deliberately odd, and scanning it would fill the Security tab with findings about code this repository does not ship. Dependabot targets develop for all three ecosystems, because a bump landing on main would be a direct commit to the release branch. Minor and patch updates are grouped into one pull request per ecosystem; ungrouped, three ecosystems would open roughly fifteen a week, each one costing a full CI run. dtolnay/rust-toolchain is excluded: it is pinned to an exact Rust version that has to move together with rust-toolchain.toml, and a pull request bumping only the action would recreate the desync that pin exists to prevent. Two limits worth recording. Dependabot reads this config from the default branch, so version updates start once the file reaches main. Security updates are always opened against the default branch and target-branch does not move them; backmerge.yml carries them into develop.
eslint.config.mjs deliberately ignores scripts/, **/*.config.*, the ts-rs-generated bindings and the examples/test-repo submodule. The language server lints whatever file is open regardless, so opening one of those put "File ignored because of a matching ignore pattern" on line 1 -- noise, not a finding. The server derives ESLint's warnIgnored from onIgnoredFiles (`onIgnoredFiles !== "off"`) and the editor does not send that key unless a project setting names it, which leaves it undefined and so truthy. Naming it is the whole fix.
ci: add codeql scanning and dependabot version updates
Closes the fourteen actions/* findings from the first CodeQL run.
Five jobs ran on the default GITHUB_TOKEN because neither their workflow
nor they declared permissions: all three in ci.yml, and release.yml's
verify-version and build. ci.yml gets one workflow-level `contents: read`,
which is the whole truth for it -- every job there checks out and runs a
gate. release.yml gets `permissions: {}` at the top and a grant per job,
so publish stays the only job that can write anything; build holds the
signing secrets and still needs nothing beyond read, because artifact
upload goes through the runner's own token rather than this one.
The five third-party actions move to commit SHAs with the version in a
trailing comment. dtolnay/rust-toolchain@1.97.1 is the one that matters
most and reads least like it: that ref is an unprotected BRANCH, not a
tag, so the release job that signs and publishes was running whatever
its head happened to be. tauri-action@v0 and rust-cache@v2 are moving
tags in the same pipeline. Dependabot keeps the SHAs and their comments
current for four of the five; rust-toolchain is excluded there and moves
by hand with rust-toolchain.toml, as before.
The actions/* uses stay on tags. GitHub publishes those immutably and
CodeQL does not flag them.
interpolate matched `\{([^}]+)\}`, whose body can cross an opening
brace. Every `{` in the template is therefore a candidate start that
scans to the end of the string before failing, which is quadratic: 20k
opening braces took 600ms and 40k took 2.3 seconds.
Excluding `{` from the body makes a failed start fail on its first
character, and the same 40k input now takes under a millisecond. Nothing
is lost, because a placeholder name never contains a brace -- and the
change is an improvement in its own right: a stray `{` in a
hand-authored catalog used to swallow the real placeholder behind it,
and now costs the author only that one brace.
No catalog is affected today. Running both patterns over every string in
all eighteen generated catalogs produces identical output, so this is a
guard against a future typo rather than a fix for a live one, and there
is nothing user-visible to record in the changelog.
Found by CodeQL (js/polynomial-redos).
`existsSync(notesPath) ? readFileSync(notesPath) : ''` asks a question whose answer the read already carries, and leaves a window between the two. Read it and treat ENOENT as "no notes yet"; anything else still throws, which the old form would have swallowed as a missing file. Found by CodeQL (js/file-system-race).
ci: close the CodeQL findings from the first scan
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
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.
Carries the security-tooling work from
developtomain. Nine files, +333/-13, and nothing else -- no product changes, soCHANGES.mdis untouched.This merge is what actually starts Dependabot: it reads
.github/dependabot.ymlfrom the default branch, so until this lands the config exists but nothing runs.What is in it
Code scanning (#38) -- CodeQL advanced setup with the
security-and-qualitysuite.javascript-typescriptandactionsare blocking and run on pushes tomain/develop, on every pull request, and weekly. Rust is advisory: it runs only on pushes todevelop, both CodeQL steps arecontinue-on-error, and a trailing step turns a failure into a warning annotation, so it can never gate a merge. Neither job checks outexamples/test-repo.Dependabot (#38) --
github-actions,cargoandnpm, all withtarget-branch: develop, weekly, minor and patch grouped into one pull request per ecosystem.dtolnay/rust-toolchainis ignored because it must move together withrust-toolchain.toml. Alerts and security updates are enabled on the repository.Findings from the first scan (#39) --
ci.ymljobs andrelease.yml'sverify-version/buildran on the defaultGITHUB_TOKEN; every job now declares its own grant, andpublishis the only one that can write.dtolnay/rust-toolchain@1.97.1turned out to be an unprotected branch, not a tag -- the job that signs and publishes releases was running whatever its head happened to be.js/polynomial-redosinpackages/i18n/src/translator.ts: 40k opening braces took 2.3s, now sub-millisecond. Verified identical output across all 18 catalogs, so nothing user-visible changes.js/file-system-raceinscripts/release-downloads.mjs.Editor (#38) --
.zed/settings.jsonsilences the ESLint language server's diagnostic on files the flat config deliberately ignores.The six Rust findings were dismissed with per-alert reasons (four
used in tests, onewon't fixfor the PPK v2 zero IV, onefalse positivefor theSSH_ASKPASShelper). One Dependabot alert was dismissed astolerable_risk:glibis fixed in 0.20, but the latesttaoandwrystill needgtk ^0.18andwrypinswebkit2gtk =2.0.2, so no version of the Tauri v2 Linux stack depends on a patchedglib.Notes
maintriggersdocs.yml, which publishes the in-progress docs under thedevalias. No release is cut --release.ymlis tag-only.main(target-branchdoes not move them);backmerge.ymlcarries them intodevelop.