You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fd9fbe9
Browse filesBrowse the repository at this point in the historyBrowse files
fix: address CodeRabbit findings on release tooling (PR #12)
- metrics_out validation (security): the path came straight from the tool
args and was written with no workspace check. The front-end index
operation now resolves it like repo_path, canonicalizes its parent
directory (which must exist), runs cbm_workspace_root_allowed on it with
the same allowed_root, rejects empty/"."/".." basenames, and rewrites the
worker argument to canonical-parent + basename so the worker writes
exactly the validated path. index_args_with_repo_path is now a thin
wrapper over a generic index_args_with_string.
- Stage file mode (security): on POSIX the main stage file is created with
open(O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0600) + fdopen, so it is
owner-only regardless of umask. Windows keeps cbm_fopen "wbx".
- Stage create retry: retry with a new suffix only when the lock hold fails
with EWOULDBLOCK/EAGAIN/EACCES or the main-file create fails with
EEXIST; any other errno stops immediately. errno is saved before
cbm_pipeline_stage_lock_drop (close/unlink can clobber it) and the saved
value is used in the lock_failed warning. Helpers keep
create_staging_path under the cognitive-complexity threshold.
- .clang-tidy: add asm-generic/.* to misc-include-cleaner.IgnoreHeaders,
next to the existing sys/ and _*.h entries, so errno macros used via
<errno.h> are not attributed to Linux-internal headers.
- index.c: free metrics_out on the invalid-project-name path; a metrics
write failure on a successful run no longer changes rc, it logs
index.metrics_write_failed and adds a metrics_error field to the response;
early cancelled / pipeline-creation-failed exits now still write a
metrics artifact (index_write_metrics already accepts a NULL pipeline and
emits zero/default pipeline-derived fields with outcome cancelled/failed).
Response building was split into helpers to stay under the complexity
limit; an allocation failure there now reports "result encoding failed".
- main.c: daemon status --json is built with yyjson so semantic_version and
build_fingerprint are escaped; keys and value types are unchanged.
- Jenkinsfile: rm -f .jenkins-installed-cli moves to the first stage so a
failed early stage cannot make post restart a stale CLI; removed the
nonexistent daemon_frontend suite from the daemon shard list.
- cli.c: the legacy-hook finding is answered with a comment fix only. The
CLI-owned hook names have used .cmd on Windows since they were introduced
(4727371), so no extensionless CLI-owned file was ever installed and the
upgrade cleanup was intentionally removed; the comment no longer claims it.
- Tests (index_resilience): metrics_out outside CBM_ALLOWED_ROOT is refused
and nothing is written; a successful index with metrics_out writes
parseable JSON with outcome success.
Validation: scripts/build-dev.sh; make lint-ci lint-tidy-diff; scripts/
security-audit.sh; scripts/test.sh --suites pipeline,index_supervisor,
index_resilience,daemon_ipc (336 passed); git diff --check.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
0 commit comments