ci: sync fork hardening and workflow fixes - #52
Conversation
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.9.5 to 26.1.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 26.1.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
* ci: pin upload-artifact workflow action * ci: document upload-artifact tag pin
…n/types/node-26.1.1 build(deps-dev): bump @types/node from 25.9.5 to 26.1.1
…ipt-action ci: pin github-script workflow action
* fix free-router security and CI checks * fix: make build data copy cross-platform * chore: refresh required checks * Fix production coverage gate and Bun dependabot * Emit full coverage report for changed-line gate * Cover changed source files in coverage gate
* ci: pin local actions to immutable SHAs * fix(security): scope workflow write permissions * Harden release and catalog workflows against untrusted refs * Move release credentials behind trusted dispatch
There was a problem hiding this comment.
Code Review
This pull request introduces test coverage reporting using c8, adds comprehensive test suites for utilities, ping logic, and workflow security, and enables source maps in tsconfig.json. It also adds a SECURITY.md policy, updates the build pipeline with a new script to copy data files to the dist directory, and modifies the Dependabot configuration. Review feedback points out that Dependabot does not support 'bun' as a package-ecosystem value, which will cause parsing errors. Additionally, it is recommended to resolve file paths in the copy-dist-data script relative to the script's directory rather than process.cwd() to prevent failures when executed from different working directories.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| version: 2 | ||
| updates: | ||
| - package-ecosystem: npm | ||
| - package-ecosystem: bun |
There was a problem hiding this comment.
Dependabot does not currently support bun as a valid package-ecosystem value. Specifying bun will cause a Dependabot configuration parsing error, preventing it from running. To update dependencies in a Bun project, you should continue using npm as the ecosystem, as it correctly parses package.json and updates the dependencies.
- package-ecosystem: npm| import { copyFile, mkdir } from "node:fs/promises"; | ||
|
|
||
| const distDataFiles = ["model-rankings.json", "model-support.json"]; | ||
|
|
||
| await mkdir("dist", { recursive: true }); | ||
| await Promise.all( | ||
| distDataFiles.map((dataFileName) => | ||
| copyFile(`data/${dataFileName}`, `dist/${dataFileName}`), | ||
| ), | ||
| ); |
There was a problem hiding this comment.
Resolving paths relative to process.cwd() makes the script fragile if executed from a different working directory (e.g., during monorepo builds, nested tool execution, or different CI setups). It is more robust to resolve paths relative to the script's own directory using import.meta.url and fileURLToPath from node:url.
import { copyFile, mkdir } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import { dirname, join } from "node:path";
const __dirname = dirname(fileURLToPath(import.meta.url));
const rootDir = join(__dirname, "..");
const distDataFiles = ["model-rankings.json", "model-support.json"];
await mkdir(join(rootDir, "dist"), { recursive: true });
await Promise.all(
distDataFiles.map((dataFileName) =>
copyFile(
join(rootDir, "data", dataFileName),
join(rootDir, "dist", dataFileName)
)
)
);
Summary
Sync
ContextualWisdomLab/free-routermain into upstream with CI, dependency, workflow security, and test hardening changes.Linked issue
Closes #51
Scope
SemVer impact
Branch flow check
devfrom a feature/fix/chore/docs/refactor/test/ci branch.mainfromrelease/*orhotfix/*.Verification
npm run lintnpm run typechecknpm run buildnpm --prefix site run build(if site changed)Breaking change notes (required for major)
N/A - patch-level CI and workflow hardening only.