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;
37pub mod obfuscation;
38mod packages;
39mod patch;
40mod paths;
41mod pattern;
42mod personal;
43mod policy;
44mod predicate;
45mod programs;
46mod realpath;
47mod repo;
48mod requests;
49mod route;
50pub mod rule_id;
51mod secret;
52mod shell;
53mod staging;
54mod taint;
55pub mod token;
56mod verdict;
57pub mod widen;
58pub mod yaml;
59
60pub use action::{Action, AtomicAction};
61pub use arguments::{
62 Arguments, MAX_VALUE_BYTES as MAX_ARGUMENT_VALUE_BYTES, MAX_VALUES as MAX_ARGUMENT_VALUES,
63 snake as argument_key,
64};
65pub use engine::{
68 CompiledPolicy, EvalContext, STAGING_ATOM, Secret as TaintSecret, Staging, Taint,
69 UntrustedKind, evaluate,
70};
71pub use host::{
72 MAX_DNS_LABEL_LEN, MAX_DNS_NAME_LEN, file_url_path, malformed_port_pattern, port_pattern,
73};
74pub use injection::{
75 InjectedLookup, InjectedMap, MAX_SCANNED_BYTES as MAX_INJECTED_SCAN_BYTES,
76 MAX_TOKENS_PER_OUTPUT as MAX_INJECTED_TOKENS_PER_OUTPUT, Token as InjectedToken,
77 TokenKind as InjectedTokenKind,
78};
79pub use kind::{Kind, UnknownKind};
80pub use packages::Ecosystem;
81pub use patch::{Replayed as PatchReplayed, replay as patch_replay, writes as patch_writes};
82pub use paths::resolve as resolve_path;
83pub use pattern::literal_shell_pattern;
84pub use policy::{
85 BrowserOpen, DeclaredVersion, Defaults, ForeignHooks, HookSettings, McpSettings, OldNames,
86 Policy, PolicyError, ProjectHookOff, ProjectTop, Require, RequiredBy, RequiredLevel,
87 Requirement, RuleGroup, RunBoundary, RunEnv, SUPPORTED_VERSION, SandboxSettings,
88 TITLE_MAX_CHARS, Unattended, WHY_MAX_CHARS, declared_version, env_name_problem,
89};
90pub use predicate::{ArgNames, Predicate, Provenance};
91pub use programs::{MapResolver, NoResolver, ProgramResolver};
92pub use realpath::{MapPathResolver, PathResolver};
93pub use repo::{REPO_RULE_PREFIX, RepoPolicy};
94pub use requests::{
95 REQUESTS_RULE_PREFIX, RequestCheck, RequestEntry, RequestRules, Untrusted as RequestsUntrusted,
96};
97pub use secret::{
98 CommandHome as SecretCommandHome, CommandSource as SecretCommand, METHOD_OVERRIDE_HEADERS,
99 PathRefusal, Permit, RequestPath, Route as SecretRoute, SECRET_RULE_PREFIX, Secret,
100 Source as SecretSource, Tls as SecretTls,
101};
102pub mod mint {
104 pub use crate::secret::{
105 AWS_CREDENTIALS, AwsSts, GCP_CREDENTIALS, Gcp, GithubApp, Helper, MintSource,
106 };
107}
108pub use shell::cwd::leaves_unknown_directory;
109pub use shell::installs::package_atoms;
110pub use shell::powershell::{POWERSHELL, is_powershell};
111pub use shell::push::Push;
112pub use shell::replaced::replaced_files;
113pub use staging::{DEFAULT_OUTSIDE_FOLDERS, DEFAULT_OUTSIDE_READS, StagingSettings};
114pub use taint::{TaintSettings, TrifectaVerdict};
115pub use verdict::{Decision, Notice, OLD_REVIEW, UnknownVerdict, Verdict};
116
117pub const DEFAULT_POLICY: &str = include_str!("../policies/default-v1.yaml");