Skip to content

ci: sync fork hardening and workflow fixes - #52

Open
seonghobae wants to merge 14 commits into
bytonylee:mainfrom
ContextualWisdomLab:hotfix/sync-contextualwisdomlab-main
Open

ci: sync fork hardening and workflow fixes#52
seonghobae wants to merge 14 commits into
bytonylee:mainfrom
ContextualWisdomLab:hotfix/sync-contextualwisdomlab-main

Conversation

@seonghobae

Copy link
Copy Markdown

Summary

Sync ContextualWisdomLab/free-router main into upstream with CI, dependency, workflow security, and test hardening changes.

Linked issue

Closes #51

Scope

  • frouter CLI
  • site
  • both

SemVer impact

  • patch
  • minor
  • major (breaking change)

Branch flow check

  • This PR targets dev from a feature/fix/chore/docs/refactor/test/ci branch.
  • This PR targets main from release/* or hotfix/*.

Verification

  • npm run lint
  • npm run typecheck
  • npm run build
  • npm --prefix site run build (if site changed)

Breaking change notes (required for major)

N/A - patch-level CI and workflow hardening only.

seonghobae and others added 13 commits July 11, 2026 18:26
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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/dependabot.yml
version: 2
updates:
- package-ecosystem: npm
- package-ecosystem: bun

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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

Comment on lines +1 to +10
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}`),
),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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)
    )
  )
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: sync fork hardening and workflow fixes

1 participant