Skip to content

docs: add missing container configuration flags to CLI reference#1610

Merged
Mossaka merged 3 commits intomainfrom
copilot/add-container-configuration-flags
Apr 2, 2026
Merged

docs: add missing container configuration flags to CLI reference#1610
Mossaka merged 3 commits intomainfrom
copilot/add-container-configuration-flags

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

The CLI reference page was missing six flags that exist in src/cli.ts.

Options Summary table

Added --ruleset-file, --agent-timeout, --env-file, --memory-limit, and --audit-dir rows.

Options Details sections

Added detailed documentation for all six flags:

  • --exclude-env <name> — was in summary table but had no details section. Documents security use with --env-all.
  • --env-file <path> — KEY=VALUE file format with comment support.
  • --memory-limit <limit><number><unit> format (b/k/m/g), default 6g.
  • --agent-timeout <minutes> — positive integer, no limit by default.
  • --audit-dir <path> — configs, policy manifest, iptables state. Also settable via AWF_AUDIT_DIR.
  • --ruleset-file <path> — YAML schema documented with field table:
version: 1
rules:
  - domain: github.com
    subdomains: true    # default: true
  - domain: example.com
    subdomains: false   # exact match only

All descriptions verified against flag definitions in src/cli.ts and schema in src/rules.ts.

Copilot AI linked an issue Apr 2, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add missing container configuration flags to CLI reference docs: add missing container configuration flags to CLI reference Apr 2, 2026
Copilot AI requested a review from Mossaka April 2, 2026 18:25
@Mossaka Mossaka requested a review from Copilot April 2, 2026 18:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the AWF CLI reference documentation to include several previously-undocumented container/configuration flags that already exist in src/cli.ts, improving completeness of the docs-site CLI reference.

Changes:

  • Added missing flags to the Options Summary table (--ruleset-file, --agent-timeout, --env-file, --memory-limit, --audit-dir).
  • Added/expanded detailed sections for --exclude-env, --env-file, --memory-limit, --agent-timeout, --audit-dir, and --ruleset-file.
  • Documented a YAML ruleset schema for domain allowlisting.
Comments suppressed due to low confidence (1)

docs-site/src/content/docs/reference/cli-reference.md:133

  • The field description for subdomains implies it controls whether subdomains are allowed, but per current code (src/rules.ts + Squid domain normalization) subdomain matching is always enabled and this flag has no effect. Adjust the schema docs so users don't assume subdomains: false will narrow the allowlist.
| `domain` | Yes | — | Domain name to allow |
| `subdomains` | No | `true` | Whether to also allow all subdomains |


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +117 to +121
- domain: github.com
subdomains: true # default: true — also allows *.github.com
- domain: example.com
subdomains: false # exact match only
```
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The subdomains: false example ("exact match only") is not accurate with the current implementation. In src/rules.ts, subdomains is parsed but expandRule() always returns the bare domain (subdomain matching is always enabled via Squid domain normalization), so subdomains: false does not restrict to exact matches. Please update the docs to reflect current behavior (e.g., mark subdomains as reserved/no-op for now, or remove the exact-match wording) or update the implementation to actually enforce exact-match semantics.

This issue also appears on line 131 of the same file.

Copilot uses AI. Check for mistakes.
@Mossaka Mossaka force-pushed the copilot/add-container-configuration-flags branch from c0f13f7 to b65f3a5 Compare April 2, 2026 21:14
@Mossaka Mossaka marked this pull request as ready for review April 2, 2026 21:14
@Mossaka Mossaka merged commit 283019c into main Apr 2, 2026
@Mossaka Mossaka deleted the copilot/add-container-configuration-flags branch April 2, 2026 21:14
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Documentation Preview

Documentation build failed for this PR. View logs.

Built from commit 9f97a17

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.

docs: add missing container configuration flags to CLI reference

3 participants