safe-chains 0.125.0

Auto-allow safe, read-only bash commands in agentic coding tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::parse::Token;
use crate::policy::check_flags;

use super::types::OwnedPolicy;

pub(super) fn check_owned(tokens: &[Token], policy: &OwnedPolicy) -> bool {
    check_flags(
        tokens,
        policy.standalone.as_slice(),
        policy.valued.as_slice(),
        policy.bare,
        policy.max_positional,
        policy.flag_style,
        policy.numeric_dash,
    )
}