1#![warn(missing_docs)]
16#![warn(clippy::print_stdout, clippy::print_stderr)]
18
19mod action;
20mod arguments;
21pub mod attribution;
22pub mod boundary;
23pub mod canary;
24pub mod diffscan;
25mod engine;
26mod expand;
27mod host;
28mod injection;
29pub mod ir;
30mod kind;
31#[doc(hidden)]
34pub mod lexer;
35pub mod lint;
36pub mod mcp_flow;
37mod packages;
38mod patch;
39mod paths;
40mod pattern;
41mod personal;
42mod policy;
43mod predicate;
44mod programs;
45mod realpath;
46mod repo;
47mod requests;
48mod route;
49pub mod rule_id;
50mod secret;
51mod shell;
52mod staging;
53mod taint;
54pub mod token;
55mod verdict;
56pub mod widen;
57pub mod yaml;
58
59pub use action::{Action, AtomicAction};
60pub use arguments::{
61 Arguments, MAX_VALUE_BYTES as MAX_ARGUMENT_VALUE_BYTES, MAX_VALUES as MAX_ARGUMENT_VALUES,
62 snake as argument_key,
63};
64pub use engine::{
67 CompiledPolicy, EvalContext, STAGING_ATOM, Secret as TaintSecret, Staging, Taint,
68 UntrustedKind, evaluate,
69};
70pub use host::{
71 MAX_DNS_LABEL_LEN, MAX_DNS_NAME_LEN, file_url_path, malformed_port_pattern, port_pattern,
72};
73pub use injection::{
74 InjectedLookup, InjectedMap, MAX_SCANNED_BYTES as MAX_INJECTED_SCAN_BYTES,
75 MAX_TOKENS_PER_OUTPUT as MAX_INJECTED_TOKENS_PER_OUTPUT, Token as InjectedToken,
76 TokenKind as InjectedTokenKind,
77};
78pub use kind::{Kind, UnknownKind};
79pub use packages::Ecosystem;
80pub use patch::{Replayed as PatchReplayed, replay as patch_replay, writes as patch_writes};
81pub use paths::resolve as resolve_path;
82pub use pattern::literal_shell_pattern;
83pub use policy::{
84 BrowserOpen, DeclaredVersion, Defaults, ForeignHooks, HookSettings, McpSettings, OldNames,
85 Policy, PolicyError, ProjectHookOff, ProjectTop, Require, RequiredBy, RequiredLevel,
86 Requirement, RuleGroup, RunBoundary, RunEnv, SUPPORTED_VERSION, SandboxSettings,
87 TITLE_MAX_CHARS, Unattended, WHY_MAX_CHARS, declared_version, env_name_problem,
88};
89pub use predicate::{ArgNames, Predicate, Provenance};
90pub use programs::{MapResolver, NoResolver, ProgramResolver};
91pub use realpath::{MapPathResolver, PathResolver};
92pub use repo::{REPO_RULE_PREFIX, RepoPolicy};
93pub use requests::{
94 REQUESTS_RULE_PREFIX, RequestCheck, RequestEntry, RequestRules, Untrusted as RequestsUntrusted,
95};
96pub use secret::{
97 CommandHome as SecretCommandHome, CommandSource as SecretCommand, METHOD_OVERRIDE_HEADERS,
98 PathRefusal, Permit, RequestPath, Route as SecretRoute, SECRET_RULE_PREFIX, Secret,
99 Source as SecretSource, Tls as SecretTls,
100};
101pub use shell::cwd::leaves_unknown_directory;
102pub use shell::installs::package_atoms;
103pub use shell::push::Push;
104pub use shell::replaced::replaced_files;
105pub use staging::{DEFAULT_OUTSIDE_FOLDERS, DEFAULT_OUTSIDE_READS, StagingSettings};
106pub use taint::{TaintSettings, TrifectaVerdict};
107pub use verdict::{Decision, Notice, OLD_REVIEW, UnknownVerdict, Verdict};
108
109pub const DEFAULT_POLICY: &str = include_str!("../policies/default-v1.yaml");