Skip to content

Commit b2871d0

Browse files
committed
fix(ci): pin the working Tirith scanner
Tirith 0.4.2 blocks the existing workflow bodies with incomplete-analysis findings, so unrelated pull requests never reach the test jobs. Pin the previously passing 0.3.1 package independently of the main nixpkgs input and use it in both CI and the dev shell.
1 parent 4c255c8 commit b2871d0

5 files changed

Lines changed: 32 additions & 2 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
# `pull_request_target`), so fork PRs only ever get a read-only token and
2727
# cannot leak secrets while we scan their code. The downstream jobs `needs`
2828
# this job, so they are skipped unless tirith passes. tirith is installed from
29-
# the flake's pinned nixpkgs so CI matches the dev shell.
29+
# the flake's pinned package so CI matches the dev shell.
3030
tirith-scan:
3131
name: tirith security scan
3232
runs-on: blacksmith-32vcpu-ubuntu-2404
@@ -44,7 +44,7 @@ jobs:
4444
persist-credentials: false
4545
- uses: ./.github/actions/setup-nix-cache
4646
- name: Install tirith
47-
run: nix profile install --inputs-from . nixpkgs#tirith
47+
run: nix profile install .#tirith
4848
# One pass produces the SARIF report and sets the gate exit code. tirith's
4949
# `--ci` exit code is: 0 = no findings, 1 = findings at/above --fail-on,
5050
# 2 = findings present but all below it. We capture it (rather than letting

‎flake.lock‎

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
66
pnpm-nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
7+
# Tirith 0.4 rejects existing shell and Nushell workflow bodies as incomplete.
8+
# Keep the last working scanner independent of routine nixpkgs updates.
9+
tirith-nixpkgs.url = "github:NixOS/nixpkgs/91cc1fdf6831e29b6c98768e721a72241f3d0797";
710
bun2nix = {
811
url = "github:nix-community/bun2nix";
912
inputs.nixpkgs.follows = "nixpkgs";
@@ -55,6 +58,7 @@
5558
./nix/git-hooks.nix
5659
./nix/packages.nix
5760
./nix/pnpm.nix
61+
./nix/tirith.nix
5862
./nix/static-package.nix
5963
./nix/darwin-x64-package.nix
6064
./nix/tests.nix

‎nix/dev-shell.nix‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ in
2828
(with pkgs; [
2929
nodejs
3030
config.packages.pnpm
31+
config.packages.tirith
3132
bun
3233
inputs.bun2nix.packages.${system}.default
3334
nushell

‎nix/tirith.nix‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{ inputs, ... }:
2+
{
3+
perSystem =
4+
{ system, ... }:
5+
{
6+
packages.tirith = inputs.tirith-nixpkgs.legacyPackages.${system}.tirith;
7+
};
8+
}

0 commit comments

Comments
 (0)