Skip to content

fix: remediate Agentdust Sonar findings - #96

Merged
hamzahamidi merged 18 commits into
mainfrom
fix/sonar-findings
Oct 25, 2026
Merged

hamzahamidi merged 18 commits into
mainfrom
fix/sonar-findings

Conversation

@hamzahamidi

Copy link
Copy Markdown
Owner

Summary

Confines release input paths to approved roots. Refactors filesystem scanning, listener verification, automatic cleanup, Codex setup, and the journal stress helper to reduce analysis complexity while preserving existing safety checks. Updates shell conditions, regular expressions, path constants, and assertions flagged by SonarCloud.

Validation

cargo fmt --all -- --check passed.
cargo check --workspace --all-targets --locked passed.
Python syntax compilation and bash -n passed.
The test suite was not run.

Keep release tooling safe under user supplied paths and make process identity checks easier to audit.
Keep release artifact reads inside the workspace and preserve threat ID validation semantics.
Handle platform-specific device number types without lossy casts or platform lint failures.
Keep Linux device IDs direct while converting signed platform device types safely.
The locked version is flagged for invalid AsyncFd I/O safety, so use the patched 1.53.3 release.
Keep requirement identifiers ASCII-only while using concise digit classes, and remove the unused return value and assertion order inconsistency.
Keep the allowed ID separators and ASCII-only identifiers explicit without a high complexity regular expression.
Name the identifier check before combining it with the none case.
Keep Agentdust analysis active in CI and on pull requests.
Avoid backtracking while accepting the same comma and horizontal space separators.
Keep repository secrets unavailable to code from external forks.
Sonar flags the residual-risk bullet regex for backtracking. Direct parsing keeps the accepted whitespace behavior without regex backtracking.
The locked cryptography dependency is affected by secret dependent branches. Use the patched release so dependency checks reject the vulnerable version no longer.
Keep the fuzz workspace on the patched constant-time implementation so its locked dependency audit can pass.
The package guard limits input binaries to trusted workspace paths, so the WSL build needs to use the checkout target directory.
Sonar needs Python coverage data and separate test scope to evaluate only production changes.
The packaging tests launch scripts as child processes, so their changed lines need subprocess coverage for Sonar.
The new path guards and fixture capture flow need tests for both accepted and refused inputs.
@hamzahamidi
hamzahamidi merged commit e5bb804 into main Oct 25, 2026
5 of 6 checks passed
@hamzahamidi
hamzahamidi deleted the fix/sonar-findings branch October 25, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant