Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
995d65d
feat: add V8 JavaScript rule engine with --js flag
blink-so[bot] Sep 11, 2025
491e4a3
fix: apply rustfmt formatting
blink-so[bot] Sep 11, 2025
82c6a65
fix: resolve clippy doc overindented list items warnings
blink-so[bot] Sep 11, 2025
a0ac4e6
Merge branch 'main' into blink/v8-js-rule-engine
ammario Sep 11, 2025
b3266f0
feat(cli): remove -r/--rule and PatternRuleEngine; make JS default
blink-so[bot] Sep 11, 2025
29ee414
test: update Linux integration tests to JS-based rules; drop -r usage
blink-so[bot] Sep 11, 2025
95b5745
chore(fmt): apply rustfmt after CLI/test refactor
blink-so[bot] Sep 11, 2025
509a569
test(linux): replace remaining -r usages with --js equivalents
blink-so[bot] Sep 11, 2025
f4e8e1b
refactor(rules): remove pattern engine completely; drop regex dep; re…
blink-so[bot] Sep 11, 2025
d9b84d3
tests: drop rule() helper for js(); README ternary example; v8: persi…
blink-so[bot] Sep 11, 2025
883c679
refactor(v8): use expression evaluation and 'r' namespace
ammario Sep 11, 2025
91af255
Merge remote-tracking branch 'origin/main' into blink/v8-js-rule-engine
ammario Sep 11, 2025
657a9a5
fix(tests): update server mode test to use JS syntax
ammario Sep 11, 2025
c98b1bf
fix(ci): run library unit tests instead of binary tests
ammario Sep 11, 2025
9ebc289
fix(tests): update remaining tests to use new JS expression syntax
ammario Sep 11, 2025
aec342e
fix(tests): update integration tests to use new JS expression syntax
ammario Sep 11, 2025
5d9e8a2
fix: update remaining tests to use new JS expression syntax
ammario Sep 11, 2025
c68d7ed
docs: add CI debugging instructions for self-hosted Linux runner
ammario Sep 11, 2025
acedb1c
fix: improve orphan cleanup to handle namespace configs without canar…
ammario Sep 11, 2025
3985012
fix: bind proxy to all interfaces (0.0.0.0) for strong jail mode
ammario Sep 11, 2025
8fd2523
fix: update remaining test to use new JS syntax
ammario Sep 11, 2025
3f3809b
fix: add allow(unused_mut) for cleaned_jails
ammario Sep 11, 2025
59f6a2a
fix: update isolated cleanup tests to use new JS syntax
ammario Sep 11, 2025
368e024
Revert to 0.0.0.0 binding for strong jail mode with TODO
ammario Sep 11, 2025
79f8bbc
docs: update remaining examples to use JavaScript syntax
ammario Sep 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .claude/commands/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Commit working changes and push them to CI

Run `cargo clippy -- -D warning` before pushing changes.

Also fetch the latest version of the base branch and merge it into the current branch.

Enter loop where you wait for CI to complete, resolve issues,
and return to user once CI is green or a major decision is needed
to resolve it.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: cargo build --verbose

- name: Run unit tests
run: cargo nextest run --profile ci --bins --verbose
run: cargo nextest run --profile ci --lib --verbose

- name: Run smoke tests
run: cargo nextest run --profile ci --test smoke_test --verbose
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Run unit tests
run: |
source ~/.cargo/env
cargo nextest run --profile ci --bins --verbose
cargo nextest run --profile ci --lib --verbose

- name: Run smoke tests
run: |
Expand Down
14 changes: 14 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,17 @@ After modifying code, run `cargo fmt` to ensure consistent formatting before com
## Logging

In regular operation of the CLI-only jail (non-server mode), info and warn logs are not permitted as they would interfere with the underlying process output. Only use debug level logs for normal operation and error logs for actual errors. The server mode (`--server`) may use info/warn logs as appropriate since it has no underlying process.

## CI Debugging

The Linux CI tests run on a self-hosted runner (`ci-1`) in GCP. Only Coder employees can directly SSH into this instance for debugging.

To debug CI failures on Linux:
```bash
gcloud --quiet compute ssh root@ci-1 --zone us-central1-f --project httpjail
```

The CI workspace is located at `/home/ci/actions-runner/_work/httpjail/httpjail`. Tests run as the `ci` user, not root. When building manually:
```bash
su - ci -c 'cd /home/ci/actions-runner/_work/httpjail/httpjail && cargo test'
```
112 changes: 109 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ isolated-cleanup-tests = []
[dependencies]
async-trait = "0.1"
clap = { version = "4.5", features = ["derive"] }
regex = "1.10"
tokio = { version = "1.35", features = ["full"] }
hyper = { version = "1.7", features = ["full"] }
hyper-util = { version = "0.1", features = ["full"] }
Expand All @@ -38,6 +37,7 @@ camino = "1.1.11"
filetime = "0.2"
ctrlc = "3.4"
url = "2.5"
v8 = "129"

[target.'cfg(target_os = "macos")'.dependencies]
nix = { version = "0.27", features = ["user"] }
Expand Down
Loading
Loading