fix(fermata): a bad glob costs only itself; commands read what is there, behind a wrapper or a shell
- A glob in [files] or [policy] that does not compile costs only that pattern while open, with a note by name beside text output. A [files] list with none left leaves the built-in list. Under deny the refusal stays, and the channel filter stays strict. - A file named `credentials` is on the default list, at any depth. - A word with a separator counts only if the path is there, the shell may expand it, or a redirect names it: packages, branches and hosts' paths are not denied. - timeout, nice, ionice, stdbuf, xargs and busybox are prefixes; `2>&1` stays in its segment. - `bash|sh|zsh -c` and `eval` arguments are read as command lines. - A `<<` with no closing line is no heredoc. A commented line's own comment is dropped. Text holding NUL fails to parse. The unknown-field message says so. Durations are bound to under 6 characters. More source extensions pass the gate. - Removed: HarnessAdapter::post_tool_op (dead since 3C was dropped), tool_op back inline.
This commit is contained in:
@@ -97,6 +97,12 @@ fn masked_in_both(files: &[(&str, &str)], read: &str, value: &str) {
|
||||
// Commented `.env` lines
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/// A commented line with a comment of its own, as a live line may have.
|
||||
#[test]
|
||||
fn a_commented_assignment_with_a_trailing_comment_is_masked() {
|
||||
masked_in_both(&[(".env", &format!("# API_TOKEN={VALUE} # old\n"))], ".env", VALUE);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_commented_assignment_is_masked() {
|
||||
for line in [
|
||||
|
||||
Reference in New Issue
Block a user