Repository navigation
Scoped profiles: fix-it denials, inspect --grants, ask before and during a run, temp: and --sealed - #74
Merged
Conversation
…json grants Every missing-grant denial (clock, environment, command, HTTP, sockets, absolute file paths) names the guion.toml line and the run flag that would allow it. guion run --json carries diagnostic.grant (table, key, value, flag) and a denials array that also lists denials a program handled itself. HostPolicy gains an optional GrantAsker for the later questions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Reads literal hosts, commands, sockets and environment names from entry-reachable code, compares them with guion.toml, and lists each missing grant as table, key, value and flag. Computed targets are reported as known only while running. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…toml in place guion run puts one plain question about the missing grants it can see in the code, answered from the terminal itself (never stdin), skipped under CI, GUION_NO_PROMPT, --no-prompt, --json, replays and without a terminal. [a] adds the exact entries to guion.toml with toml_edit, keeping comments and order. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
guion run and guion test give each run a fresh owner-only folder under TMPDIR, reached as temp:name; it never falls through to the project folder and is removed when the run ends, including after a failure (--keep-temp keeps it). --sealed runs with no file access and none of the project's grants. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…stion-given grants When a person is present, a denied effect whose target is computed (a host read from a file, a command from arguments) pauses and asks about that exact target; questions are serialized and a target is asked once. A no to the first question means nothing more is asked that run. A recording's header lists the grants that came from a question; run --json reports them too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ion flags now reach the run Each repl entry is a separate run, so an allowed grant is passed to later entries as a run flag. Repl options were placed after the file name, where run treats them as program arguments; they now come before it. RuntimeError boxes its grant hint to stay small. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…gelog; design marked built Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements
docs/design-scoped-profiles.mdin its build order. A person writing a quick script no longer needs to learn permission flags, and a running program still cannot widen its own access.guion.tomlline and the run flag that would allow them.run --jsoncarriesdiagnostic.grantand adenialsarray. Error codes are unchanged.guion inspect --grants [--json]. Compares what the reachable code needs with whatguion.tomlgrants. Targets computed at run time are reported as known only while running./dev/tty, never stdin. Skipped whenCIorGUION_NO_PROMPTis set, or with--no-prompt,--json,--sealed,--replay, orguion test.[a]editsguion.tomlin place withtoml_edit, keeping comments and order.temp:and--sealed. Each run and test gets a private folder underTMPDIR, removed afterwards (--keep-tempkeeps it).--sealedruns with no file access and none of the project's grants.guion replfollows the same rules, and a yes lasts the session.Decisions worth a look
guion replpreviously put permission flags after the file name, whererunread them as program arguments. Fixed, since session grants depend on it (noted in the CHANGELOG)...path escapes get a message but no structured grant.Not verified
CONIN$answer path has not been compiled or run on Windows.script. They pass on macOS, and the Linux form has not been run.Testing
Full workspace test run passed locally (98 test binaries) and
cargo clippy --workspace --all-targets -D warningsis clean. 27 new tests are incrates/cli/tests/grants.rs.🤖 Generated with Claude Code