Marius Ciepluch
56c4620087
feat(contributor-scan): a scan skips its runs directory when it lies inside the scanned path (3.1, follow-up)
...
Since part A a native scan writes its run under the user cache or wherever
`OPENULTRASAST_RUNS_DIR` points. A scan of a path that contains that directory,
a home directory or a tree with the runs directory set inside it, took the
files under it for source: those of earlier runs and those of its own run. On
the code as it was, a source file under the runs directory inside the target
was read and its finding reported (`file_targets=3 findings=2` for a tree of
two files and one such copy).
By the maintainer's decision, recorded as step 2c of the handover, the scan
skips the runs directory only: `config.runs_dir`, the default location or the
override. The other directories under `~/.cache/openultrasast` are read as
before, and so is every tree whose runs directory lies outside it.
`preprocess_repository` and `enumerate_source_files` in
src/openultrasast/preprocess.py take a `skip` directory, and the preprocess
stage of a scan (`_map_scan_targets` in cli.py) passes `Path(config.runs_dir)`.
The skip applies only where the runs directory lies inside the scanned path:
a target that is the runs directory or lies inside it is read as it was, so a
runs directory set to `.` does not silence a scan. Both paths are compared
resolved, so a symlinked or relative name is found, and the excluded path is
built under the root as the walk spells it, so a relative root works too. Every
other caller of the two functions passes no `skip` and is unchanged.
No run of this package keeps a source file today (the independent reviewer's
count: a quick run holds 15 files, all `.json`, `.jsonl`, `.md` or `.sarif`;
the two benchmark runs in the real cache hold `.json` and `.toml`). The copy in
the tests is a constructed case.
Tests: four tests failed on the code as it was and pass after the change: the
runs directory inside the scanned path, by the override, by the default
location and by the override through a symlink, and the rest of the cache
still read. Two more pin the narrow reading, a target that is the runs
directory or lies inside it is read as it was; they failed on a first cut
that skipped more than was decided. A direct call with a relative root pins
the path comparison. The nine test files around the change pass (113 passed),
as do the 37 files that exercise the scan path (362 passed); ruff, mypy, the
three gates and compileall pass. Runs of the real CLI on one scratch subject,
the code at HEAD against this tree: with the runs directory inside the target
the copy under it is no longer read (`file_targets=4 findings=3` for five
source files); with the runs directory a parent of the target, or the target
itself, both read the same five files and report the same four findings. An
independent reviewer approved the change in three rounds; its first round
found that the first cut also silenced a scan whose target lay inside the
runs directory, which this cut narrows to the decided case.
2026-11-25 14:41:44 +01:00
..
2026-11-06 16:08:41 +01:00
2026-06-22 17:13:02 +02:00
2026-11-17 17:34:49 +01:00
2026-11-03 18:37:44 +01:00
2026-11-03 18:37:44 +01:00
2026-11-22 20:12:03 +01:00
2026-11-24 15:33:35 +01:00
2026-11-04 08:53:21 +01:00
2026-11-01 18:32:24 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 15:09:42 +01:00
2026-11-04 10:53:09 +01:00
2026-11-04 12:08:32 +01:00
2026-11-04 12:08:32 +01:00
2026-11-20 20:08:16 +01:00
2026-11-12 15:55:43 +01:00
2026-10-31 14:08:35 +01:00
2026-11-04 15:09:42 +01:00
2026-11-24 20:16:23 +01:00
2026-11-04 15:09:42 +01:00
2026-11-04 10:53:09 +01:00
2026-11-04 15:09:42 +01:00
2026-11-01 18:16:07 +01:00
2026-11-01 18:16:07 +01:00
2026-11-01 18:16:07 +01:00
2026-10-01 10:13:31 +02:00
2026-10-02 21:05:48 +02:00
2026-09-29 19:41:35 +02:00
2026-10-29 19:01:25 +01:00
2026-11-03 18:37:44 +01:00
2026-11-04 08:53:21 +01:00
2026-10-12 15:22:55 +02:00
2026-10-13 10:50:01 +02:00
2026-11-03 18:37:44 +01:00
2026-11-01 17:01:44 +01:00
2026-10-06 11:15:09 +02:00
2026-10-06 14:51:07 +02:00
2026-10-04 12:03:19 +02:00
2026-11-03 18:37:44 +01:00
2026-11-25 10:40:01 +01:00
2026-10-13 11:06:09 +02:00
2026-10-31 07:10:36 +01:00
2026-09-08 12:15:54 +02:00
2026-09-03 20:33:48 +02:00
2026-10-14 02:49:44 +02:00
2026-09-03 20:33:48 +02:00
2026-09-03 20:05:13 +02:00
2026-11-24 15:33:35 +01:00
2026-10-31 19:38:01 +01:00
2026-11-01 10:37:37 +01:00
2026-11-01 12:03:51 +01:00
2026-11-01 10:37:37 +01:00
2026-11-04 09:54:47 +01:00
2026-11-01 10:18:02 +01:00
2026-11-01 11:34:23 +01:00
2026-10-31 19:08:14 +01:00
2026-11-01 09:20:02 +01:00
2026-11-06 16:08:41 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 15:09:42 +01:00
2026-11-04 08:53:21 +01:00
2026-10-31 13:39:51 +01:00
2026-11-04 09:54:47 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-10-31 14:08:35 +01:00
2026-11-11 20:50:46 +01:00
2026-11-11 20:50:46 +01:00
2026-11-11 17:08:45 +01:00
2026-11-11 10:07:53 +01:00
2026-11-10 08:31:33 +01:00
2026-11-12 13:41:30 +01:00
2026-11-12 13:41:30 +01:00
2026-11-11 12:18:33 +01:00
2026-11-11 22:57:20 +01:00
2026-11-11 12:18:33 +01:00
2026-11-12 13:41:30 +01:00
2026-11-10 07:56:20 +01:00
2026-11-12 15:55:43 +01:00
2026-11-11 22:57:20 +01:00
2026-11-11 10:07:53 +01:00
2026-11-11 15:49:36 +01:00
2026-11-11 12:18:33 +01:00
2026-11-11 14:59:30 +01:00
2026-11-06 18:14:14 +01:00
2026-11-11 12:18:33 +01:00
2026-11-12 01:12:14 +01:00
2026-11-12 00:14:53 +01:00
2026-11-11 13:04:39 +01:00
2026-11-11 10:40:48 +01:00
2026-11-11 19:01:06 +01:00
2026-11-11 19:01:06 +01:00
2026-11-11 16:50:23 +01:00
2026-11-11 14:27:15 +01:00
2026-11-10 09:08:32 +01:00
2026-11-06 17:27:19 +01:00
2026-10-31 14:18:51 +01:00
2026-11-01 18:32:24 +01:00
2026-10-31 16:33:53 +01:00
2026-10-31 15:44:48 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-10-31 15:28:14 +01:00
2026-10-31 14:32:37 +01:00
2026-10-31 14:27:18 +01:00
2026-10-31 14:13:39 +01:00
2026-11-01 11:34:23 +01:00
2026-10-31 18:26:24 +01:00
2026-11-06 16:22:08 +01:00
2026-11-04 08:53:21 +01:00
2026-11-11 20:50:46 +01:00
2026-11-04 08:53:21 +01:00
2026-11-11 21:17:51 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-10-31 16:57:11 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 09:54:47 +01:00
2026-10-31 14:00:47 +01:00
2026-10-31 15:11:01 +01:00
2026-10-31 14:39:16 +01:00
2026-10-31 13:55:12 +01:00
2026-10-31 17:30:40 +01:00
2026-11-04 08:53:21 +01:00
2026-11-04 09:54:47 +01:00
2026-10-12 14:16:36 +02:00
2026-09-26 07:44:33 +02:00
2026-10-13 10:50:01 +02:00
2026-10-04 16:41:22 +02:00
2026-11-24 15:33:35 +01:00
2026-06-22 17:13:02 +02:00
2026-11-02 11:03:36 +01:00
2026-11-04 10:53:09 +01:00
2026-11-04 12:08:32 +01:00
2026-11-20 20:08:16 +01:00
2026-11-04 15:09:42 +01:00
2026-11-02 10:49:38 +01:00
2026-10-30 08:38:58 +01:00
2026-09-24 11:08:22 +02:00
2026-10-02 10:15:19 +02:00
2026-10-12 16:03:14 +02:00
2026-10-04 16:41:22 +02:00
2026-10-14 08:08:32 +02:00
2026-11-01 18:16:07 +01:00
2026-11-01 18:48:25 +01:00
2026-11-01 17:42:05 +01:00
2026-11-01 17:17:05 +01:00
2026-11-01 15:09:28 +01:00
2026-10-29 21:04:51 +01:00
2026-11-01 17:24:50 +01:00
2026-09-23 19:36:32 +02:00
2026-10-14 02:49:44 +02:00
2026-10-30 09:44:27 +01:00
2026-09-14 08:07:06 +02:00
2026-11-24 15:33:35 +01:00
2026-10-13 10:50:01 +02:00
2026-09-25 15:29:43 +02:00
2026-09-13 17:08:49 +02:00
2026-11-24 15:33:35 +01:00
2026-10-13 11:06:09 +02:00
2026-10-13 18:49:58 +02:00
2026-10-13 20:22:22 +02:00
2026-11-03 18:37:44 +01:00
2026-10-13 19:03:23 +02:00
2026-10-14 09:35:16 +02:00
2026-10-14 02:49:44 +02:00
2026-10-14 02:49:44 +02:00
2026-11-01 12:18:30 +01:00
2026-10-14 13:24:45 +02:00
2026-10-13 23:17:15 +02:00
2026-10-13 20:22:22 +02:00
2026-10-14 19:01:07 +02:00
2026-11-03 18:37:44 +01:00
2026-10-13 20:44:18 +02:00
2026-11-03 18:37:44 +01:00
2026-10-14 02:49:44 +02:00
2026-11-03 18:37:44 +01:00
2026-10-13 12:00:37 +02:00
2026-11-24 15:33:35 +01:00
2026-10-13 12:00:37 +02:00
2026-11-16 16:55:56 +01:00
2026-10-29 16:10:44 +01:00
2026-11-01 16:56:26 +01:00
2026-10-04 14:39:36 +02:00
2026-10-30 20:10:22 +01:00
2026-11-03 18:37:44 +01:00
2026-10-29 19:20:24 +01:00
2026-09-30 18:49:05 +02:00
2026-10-03 14:41:55 +02:00
2026-10-01 10:36:34 +02:00
2026-10-02 10:15:19 +02:00
2026-10-01 10:36:34 +02:00
2026-10-02 10:15:19 +02:00
2026-10-02 17:24:49 +02:00
2026-10-02 16:12:08 +02:00
2026-10-03 15:06:08 +02:00
2026-10-03 15:06:08 +02:00
2026-10-13 11:06:09 +02:00
2026-10-01 11:03:54 +02:00
2026-10-02 15:25:21 +02:00
2026-10-01 20:40:41 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 11:06:09 +02:00
2026-10-03 09:40:58 +02:00
2026-10-13 11:06:09 +02:00
2026-10-14 09:35:16 +02:00
2026-09-04 11:53:06 +02:00
2026-10-14 19:01:07 +02:00
2026-10-29 20:59:37 +01:00
2026-10-29 20:59:37 +01:00
2026-10-13 11:06:09 +02:00
2026-11-25 10:40:01 +01:00
2026-10-30 08:09:02 +01:00
2026-09-25 14:30:36 +02:00
2026-10-13 11:06:09 +02:00
2026-09-09 13:09:47 +02:00
2026-09-28 09:10:02 +02:00
2026-11-24 11:43:37 +01:00
2026-09-08 19:46:58 +02:00
2026-09-14 08:07:06 +02:00
2026-09-09 09:27:19 +02:00
2026-09-17 14:04:39 +02:00
2026-09-09 07:42:44 +02:00
2026-11-24 11:43:37 +01:00
2026-11-24 11:43:37 +01:00
2026-09-09 12:45:21 +02:00
2026-09-09 16:13:17 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 11:06:09 +02:00
2026-09-04 11:50:44 +02:00
2026-10-29 14:11:13 +01:00
2026-10-29 15:06:53 +01:00
2026-10-14 19:01:07 +02:00
2026-10-14 16:50:04 +02:00
2026-11-02 13:41:35 +01:00
2026-11-01 15:02:04 +01:00
2026-09-05 19:38:04 +02:00
2026-10-14 17:31:07 +02:00
2026-10-14 17:31:07 +02:00
2026-09-06 07:24:13 +02:00
2026-10-29 15:23:43 +01:00
2026-10-14 17:31:07 +02:00
2026-10-14 17:31:07 +02:00
2026-09-06 07:24:13 +02:00
2026-09-06 07:24:13 +02:00
2026-10-29 14:48:53 +01:00
2026-11-24 15:33:35 +01:00
2026-09-05 19:38:04 +02:00
2026-09-06 07:24:13 +02:00
2026-10-31 07:10:36 +01:00
2026-10-14 19:01:07 +02:00
2026-10-13 12:00:37 +02:00
2026-10-13 16:15:32 +02:00
2026-09-08 19:46:58 +02:00
2026-10-29 19:17:37 +01:00
2026-09-08 19:46:58 +02:00
2026-09-30 18:49:05 +02:00
2026-11-24 15:33:35 +01:00
2026-09-29 19:04:52 +02:00
2026-09-29 17:41:09 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 11:06:09 +02:00
2026-10-14 02:49:44 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 12:00:37 +02:00
2026-10-13 12:00:37 +02:00
2026-10-02 20:32:51 +02:00
2026-10-01 09:56:52 +02:00
2026-10-13 12:00:37 +02:00
2026-10-04 12:03:19 +02:00
2026-10-14 02:49:44 +02:00
2026-10-13 11:06:09 +02:00
2026-10-13 12:00:37 +02:00
2026-10-02 20:26:46 +02:00
2026-10-14 02:49:44 +02:00
2026-10-02 08:07:35 +02:00
2026-09-30 08:19:46 +02:00
2026-10-13 12:00:37 +02:00
2026-06-22 12:31:35 +02:00
2026-06-17 21:13:51 +02:00
2026-09-23 19:05:08 +02:00
2026-09-05 10:45:43 +02:00
2026-11-04 08:53:21 +01:00
2026-11-03 18:37:44 +01:00
2026-10-29 19:34:44 +01:00
2026-11-06 14:13:29 +01:00
2026-09-07 07:37:41 +02:00
2026-09-17 09:56:59 +02:00
2026-11-23 13:45:27 +01:00
2026-09-13 18:03:31 +02:00
2026-10-02 22:31:14 +02:00
2026-09-13 16:16:19 +02:00
2026-09-23 14:12:47 +02:00
2026-09-12 21:12:45 +02:00
2026-09-13 19:32:43 +02:00
2026-09-13 15:24:06 +02:00
2026-10-02 22:51:22 +02:00
2026-09-13 19:06:02 +02:00
2026-10-02 21:57:42 +02:00
2026-10-13 11:06:09 +02:00
2026-10-02 22:51:22 +02:00
2026-09-13 17:45:16 +02:00
2026-10-02 22:24:24 +02:00
2026-09-21 13:50:38 +02:00
2026-10-02 22:18:14 +02:00
2026-09-13 18:43:13 +02:00
2026-09-13 13:25:44 +02:00
2026-09-23 07:55:33 +02:00
2026-09-13 17:08:49 +02:00
2026-09-12 19:04:20 +02:00
2026-10-11 10:12:03 +02:00
2026-10-02 21:57:42 +02:00
2026-10-13 11:06:09 +02:00
2026-06-22 20:02:34 +02:00
2026-11-06 14:12:56 +01:00
2026-09-30 12:45:29 +02:00
2026-11-16 14:53:01 +01:00
2026-11-24 15:33:35 +01:00
2026-11-24 15:33:35 +01:00
2026-09-09 08:10:59 +02:00
2026-11-24 15:33:35 +01:00
2026-10-30 08:38:09 +01:00
2026-11-24 17:51:37 +01:00
2026-11-24 15:33:35 +01:00
2026-10-30 08:53:05 +01:00
2026-11-25 14:41:44 +01:00
2026-11-24 15:33:35 +01:00
2026-11-24 15:33:35 +01:00
2026-06-22 15:41:17 +02:00
2026-10-05 21:07:58 +02:00
2026-11-24 20:16:23 +01:00
2026-10-05 14:26:43 +02:00
2026-10-06 17:07:24 +02:00
2026-10-13 11:06:09 +02:00
2026-11-01 12:38:49 +01:00
2026-10-13 10:50:01 +02:00
2026-10-06 14:37:58 +02:00
2026-10-06 11:15:09 +02:00
2026-10-09 14:03:30 +02:00
2026-10-05 20:40:13 +02:00
2026-10-14 07:54:09 +02:00
2026-10-14 07:54:09 +02:00
2026-10-05 17:26:06 +02:00
2026-10-14 07:54:09 +02:00
2026-10-06 14:37:58 +02:00
2026-10-06 11:15:09 +02:00
2026-11-24 20:16:23 +01:00
2026-11-24 20:16:23 +01:00
2026-10-29 15:33:18 +01:00
2026-10-14 19:01:07 +02:00
2026-10-14 09:35:16 +02:00
2026-11-24 15:33:35 +01:00
2026-09-04 15:07:35 +02:00
2026-11-24 15:33:35 +01:00
2026-09-30 18:49:05 +02:00
2026-10-13 13:10:19 +02:00
2026-10-14 14:47:08 +02:00
2026-09-04 11:49:44 +02:00
2026-10-13 10:50:01 +02:00
2026-10-13 12:43:02 +02:00
2026-10-13 10:34:57 +02:00
2026-10-29 15:45:29 +01:00
2026-11-24 14:25:30 +01:00
2026-11-24 15:33:35 +01:00
2026-10-13 21:46:45 +02:00
2026-09-06 12:39:55 +02:00
2026-10-10 17:10:19 +02:00
2026-10-10 07:54:49 +02:00
2026-10-05 08:14:57 +02:00
2026-10-10 16:33:29 +02:00
2026-10-04 19:17:35 +02:00
2026-10-14 08:42:25 +02:00
2026-10-10 07:54:49 +02:00
2026-10-04 19:17:35 +02:00
2026-10-05 08:14:57 +02:00
2026-10-04 20:19:14 +02:00
2026-11-03 18:37:44 +01:00
2026-10-04 20:19:14 +02:00
2026-10-08 10:26:11 +02:00
2026-11-23 20:15:21 +01:00
2026-11-23 02:50:12 +01:00
2026-11-21 19:28:10 +01:00
2026-11-21 19:28:10 +01:00
2026-11-23 20:15:09 +01:00
2026-11-17 17:34:49 +01:00
2026-11-17 16:47:55 +01:00
2026-11-17 14:37:20 +01:00
2026-11-17 13:59:33 +01:00
2026-11-23 09:27:41 +01:00
2026-11-22 10:25:59 +01:00
2026-11-23 09:27:41 +01:00
2026-11-23 11:40:09 +01:00
2026-11-16 15:51:29 +01:00
2026-11-20 20:08:21 +01:00
2026-11-17 16:11:24 +01:00
2026-11-16 17:31:05 +01:00
2026-11-23 21:54:42 +01:00
2026-11-23 09:27:41 +01:00
2026-11-16 17:08:05 +01:00
2026-11-23 09:27:41 +01:00
2026-11-23 11:40:09 +01:00
2026-11-23 09:27:41 +01:00
2026-11-16 17:41:41 +01:00
2026-11-16 15:51:29 +01:00
2026-11-23 02:50:12 +01:00
2026-11-17 20:34:11 +01:00
2026-11-17 20:34:11 +01:00
2026-11-17 13:35:45 +01:00
2026-11-21 12:41:42 +01:00
2026-11-16 16:06:01 +01:00
2026-11-17 22:42:00 +01:00
2026-11-21 19:28:10 +01:00
2026-11-21 19:28:10 +01:00
2026-11-16 18:09:48 +01:00
2026-11-23 09:27:41 +01:00
2026-11-23 09:27:41 +01:00
2026-11-16 18:41:49 +01:00
2026-11-17 13:07:06 +01:00
2026-11-17 13:07:06 +01:00
2026-11-23 13:31:01 +01:00
2026-11-23 09:27:41 +01:00
2026-11-23 11:40:09 +01:00
2026-11-23 11:40:09 +01:00
2026-11-23 20:15:28 +01:00
2026-11-24 07:41:26 +01:00
2026-11-21 13:39:38 +01:00
2026-11-20 20:25:08 +01:00
2026-11-21 19:28:10 +01:00
2026-11-23 13:31:01 +01:00
2026-11-16 15:23:52 +01:00
2026-11-23 09:27:41 +01:00
2026-11-21 19:28:10 +01:00
2026-11-21 19:28:10 +01:00
2026-10-13 20:47:23 +02:00
2026-11-24 15:33:35 +01:00
2026-10-29 19:11:30 +01:00
2026-11-23 21:54:42 +01:00
2026-11-23 09:27:41 +01:00
2026-11-24 07:41:26 +01:00