@@ -97,9 +97,8 @@ Type Ctrl-C to stop this command.
9797.. Help starts: crosshair watch --help
9898 .. code-block :: text
9999
100- usage: crosshair watch [-h] [--verbose]
101- [--extra_plugin EXTRA_PLUGIN [EXTRA_PLUGIN ...]]
102- [--analysis_kind KIND]
100+ usage: crosshair watch [-h] [--verbose] [--extra_plugin FILE [FILE ...]]
101+ [--unblock EVENT [EVENT ...]] [--analysis_kind KIND]
103102 TARGET [TARGET ...]
104103
105104 The watch command continuously looks for contract counterexamples.
@@ -112,8 +111,14 @@ Type Ctrl-C to stop this command.
112111 options:
113112 -h, --help show this help message and exit
114113 --verbose, -v Output additional debugging information on stderr
115- --extra_plugin EXTRA_PLUGIN [EXTRA_PLUGIN ...]
114+ --extra_plugin FILE [FILE ...]
116115 Plugin file(s) you wish to use during the current execution
116+ --unblock EVENT [EVENT ...]
117+ Allow specific side-effects. See the list of audit events at:
118+ https://docs.python.org/3/library/audit_events.html
119+ You may specify colon-delimited event arguments to narrow the unblock, e.g.:
120+ --unblock subprocess.Popen:echo
121+ Finally, `--unblock EVERYTHING` will disable all side-effect detection.
117122 --analysis_kind KIND Kind of contract to check.
118123 By default, the PEP316, deal, and icontract kinds are all checked.
119124 Multiple kinds (comma-separated) may be given.
@@ -137,9 +142,9 @@ It is more customizable than ``watch`` and produces machine-readable output.
137142.. Help starts: crosshair check --help
138143 .. code-block :: text
139144
140- usage: crosshair check [-h] [--verbose]
141- [--extra_plugin EXTRA_PLUGIN [EXTRA_PLUGIN ...]]
142- [--report_all] [-- report_verbose]
145+ usage: crosshair check [-h] [--verbose] [--extra_plugin FILE [FILE ...]]
146+ [--unblock EVENT [EVENT ...]] [--report_all ]
147+ [--report_verbose]
143148 [--max_uninteresting_iterations MAX_UNINTERESTING_ITERATIONS]
144149 [--per_path_timeout FLOAT]
145150 [--per_condition_timeout FLOAT] [--analysis_kind KIND]
@@ -164,8 +169,14 @@ It is more customizable than ``watch`` and produces machine-readable output.
164169 options:
165170 -h, --help show this help message and exit
166171 --verbose, -v Output additional debugging information on stderr
167- --extra_plugin EXTRA_PLUGIN [EXTRA_PLUGIN ...]
172+ --extra_plugin FILE [FILE ...]
168173 Plugin file(s) you wish to use during the current execution
174+ --unblock EVENT [EVENT ...]
175+ Allow specific side-effects. See the list of audit events at:
176+ https://docs.python.org/3/library/audit_events.html
177+ You may specify colon-delimited event arguments to narrow the unblock, e.g.:
178+ --unblock subprocess.Popen:echo
179+ Finally, `--unblock EVERYTHING` will disable all side-effect detection.
169180 --report_all Output analysis results for all postconditions (not just failing ones)
170181 --report_verbose Output context and stack traces for counterexamples
171182 --max_uninteresting_iterations MAX_UNINTERESTING_ITERATIONS
@@ -287,3 +298,5 @@ directly or indirectly cause side-effects.
287298CrossHair puts some protections in place (via ``sys.addaudithook ``) to prevent disk
288299and network access, but this protection is not perfect. (notably, it will not
289300prevent actions taken by C-based modules)
301+ You can bypass CrossHair's internal protections with the ``--unblock `` command-line
302+ option, which may be appropriate in a containerized or otherwise isolated environment.
0 commit comments