Repository navigation
canship 0.8.0
Added
Route coverage
- Hono
OpenAPIHono.openapi()handlers,openapiRoutes()batches, and route configurations imported from other modules. Unresolved batch entries mark coverage incomplete instead of being skipped silently. - Project router factories (
const app = makeApp()) for Express, Hono and Fastify, including single-targettsconfig/jsconfigpathsand explicitly linked workspace packages.
Baselines and comparison
- Baseline v4 with optional acceptance reasons and UTC expiry.
--baseline-review,--baseline-pruneand--baseline-acceptprint reviewed candidates without changing the source file;--baseline-migrateupgrades v2/v3 baselines. - Stable v3 finding identity: title, wording and line moves no longer change a finding's identity.
--compare=before.json --with=after.jsonlists added, persisting and no-longer-observed findings in the terminal, JSON or an offline HTML view. Absence is not reported as a fix.
Scanning workflow
--workspace=PATHscans explicit subprojects independently, each with its own configuration and baseline.--exclude=PATHexcludes literal paths and discloses them in every report.--explain-config,--doctorand a bundled JSON schema forcanship.config.jsonwith line/column diagnostics.--init=config|ci|ci-workspaces|pre-commitpreviews templates without writing files.--share-summaryprints counts and scope flags without paths or project text.- Interactive progress and Ctrl+C cancellation; the
scan()API acceptssignalandonProgress. --build-infoidentifies development, prerelease and release builds.
Reports
- Scoped before/after remediation examples in the terminal, HTML and fix prompts.
- HTML confidence filter, stable finding links and accessibility improvements.
Opt-in deployment probes
--probe=https://…previews an HTTPS HEAD/OPTIONS plan; requests are sent only with the matching--confirm-probedigest. Static scans remain offline.
VS Code extension (development preview)
- Bundled scanner, Problems integration, fix-prompt copy and reviewed line suppressions. Not published to the Marketplace; see the extension README to build a local VSIX.
Fixed
- Conditional middleware no longer protects routes registered outside its branch.
- Authentication middleware re-exported through a barrel module (
export * from,export { name } from) is now followed to its definition, and Hono routes that helper functions register on a sub-app mounted from another file now inherit that mount's middleware. Previously such routes were reported as unauthenticated writes atlikelyconfidence. - Consistent verdicts and follow-up commands across terminal, HTML and JSON; PowerShell-safe quoting on Windows.
- Stable
errors[].codevalues and a final output status when report writing fails.
Compatibility
- New baselines are v4. v2/v3 remain readable; older scanners reject v4 instead of ignoring expiry.
- GitHub code scanning alert identity was verified across repeated uploads, moved lines, changed wording/version and a partial fix. GitHub's own line hash also covers nearby code, so editing adjacent lines can still open a new alert.
- The Action now defaults to
0.8.0, and the README pins the Action commit that uses it.
Usage
npx canship@0.8.0 .Requires Node.js 18 or later; no runtime dependencies. Static scanning does not execute project code or make network requests. Findings describe static evidence and do not prove exploitability.
npm package · Documentation · 简体中文 · Changes since 0.7.1
Source commit: 0700a3d119573b1d13c5f5b60f4e93ab87244b35.