Repository navigation
Closed
gracesmith6504/OpenShell
#6Description
Agent Diagnostic
- Skills loaded:
launch-openshell-gator,create-github-issue. - OpenShell version tested:
0.0.92-dev.3+g850bd42eon the localdocker-devgateway. - Latest release checked:
v0.0.91published 2026-07-24. - Known fixes reviewed: reviewed the current bypass-rule generator and its unit tests; related open issue feat(supervisor): NFLOG-based bypass detection to drop the CAP_SYSLOG requirement #2382 tracks an NFLOG-based redesign, but does not describe this nft syntax error.
- Possible duplicates reviewed: searched open and closed issues for
nft log prefix bypassandnftables bypass detection; no duplicate found. - Findings: gator sandbox startup consistently logs failures for the optional TCP and UDP nft
log prefixrules. The generated command uses an unquoted value containing colons, which nft parses as invalid syntax. The required ACCEPT/REJECT bypass rules continue to install. - Remaining reason for filing: this deterministically disables bypass-attempt logging and makes the success event misleading, even on hosts where nft logging otherwise works.
Description
Actual behavior: Sandbox startup emits warnings such as:
non-required nft command failed in namespace (continuing)
command=add rule inet openshell_bypass output tcp flags syn limit rate 5/second burst 10 packets log prefix openshell:bypass:sandbox-cc817378: flags skuid
error=Error: syntax error, unexpected colon, expecting end of file or newline or semicolon
The same failure occurs for the UDP log rule. install_bypass_rules() subsequently emits Bypass detection rules installed, although the LOG rules did not install.
Expected behavior: The log prefix is passed as an nft string literal, for example:
log prefix "openshell:bypass:sandbox-cc817378:" flags skuid
Both TCP and UDP bypass LOG rules should install when nft logging is available. If an optional rule fails, the configuration outcome should accurately indicate partial observability degradation.
Reproduction Steps
- Start a Docker-backed sandbox that invokes
NetworkNamespace::install_bypass_rules()with a namespace name such assandbox-cc817378. - Read sandbox supervisor logs.
- Observe syntax failures for the generated
log prefix openshell:bypass:<namespace>:TCP and UDP rules.
Environment
- OS: Linux (DGX Spark host)
- Runtime: Docker-backed
docker-devgateway - OpenShell:
0.0.92-dev.3+g850bd42e - Latest release checked: yes,
v0.0.91 - Possible duplicates checked: yes; related but non-duplicate feat(supervisor): NFLOG-based bypass detection to drop the CAP_SYSLOG requirement #2382 found
Suggested Fix and Regression Coverage
- In
crates/openshell-supervisor-process/src/netns/nft_ruleset.rs, render thelog prefixvalue as an nft-quoted string, including correct escaping for any permitted characters. - Update the existing expected-command tests, which currently assert the unquoted invalid form.
- Add a regression test that validates the generated log rules against nft parsing (or an equivalent parser/integration fixture), so command-shape tests alone cannot accept invalid nft syntax.
- Consider emitting a partial/degraded configuration result when non-required logging rules fail, instead of reporting all bypass detection rules as installed.
Metadata
Metadata
Assignees
Labels
No labels
Activity
gracesmith6504 commentedon Jul 28, 2026
I'd love to work on this issue
fix(supervisor): quote nft log prefix in bypass rules
fix(supervisor): quote nft log prefix in bypass rules
fix(supervisor): quote nft log prefix in bypass rules (NVIDIA#2555)