Skip to content

phase a/vuln scan#49

Merged
aksOps merged 1 commit into
mainfrom
phase-a/vuln-scan
Apr 17, 2026
Merged

phase a/vuln scan#49
aksOps merged 1 commit into
mainfrom
phase-a/vuln-scan

Conversation

@aksOps

@aksOps aksOps commented Apr 17, 2026

Copy link
Copy Markdown
Contributor
  • chore(baseline): scaffold baseline dirs and gitignore
  • chore(baseline): add seed-repo fetch script with pinned commits
  • chore(baseline): add Maven verify + JaCoCo capture script
  • chore(baseline): add flaky-test scan (N repeated runs)
  • chore(baseline): add SpotBugs baseline capture
  • chore(baseline): add dependency-tree + license snapshot capture
  • chore(baseline): add frontend audit (npm audit + Vite + Playwright)
  • chore(baseline): add index/enrich/serve-smoke pipeline capture
  • chore(baseline): run pipeline on realworld-express
  • chore(baseline): add OWASP dependency-check baseline capture (NVD sync needs retry)
  • chore(baseline): add consolidator and publish first BASELINE.md
  • docs(baseline): capture real CVE inventory via OSV-Scanner + Dependabot

@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@aksOps has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 57 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 13 minutes and 57 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 627ca695-f6c3-42b2-ab7c-99c750705581

📥 Commits

Reviewing files that changed from the base of the PR and between bce0a01 and 6118ab6.

📒 Files selected for processing (1)
  • docs/superpowers/baselines/2026-04-17/BASELINE.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch phase-a/vuln-scan

Comment @coderabbitai help to get the list of available commands and usage tips.

Replaces the FAILED OWASP dep-check placeholder with a real vulnerability
inventory produced by:

  - OSV-Scanner 1.9.2 (Google, no API key, OSV.dev aggregator — covers
    GHSA + RustSec + PyPA + Go vulndb + Maven Central advisories).
  - GitHub Dependabot alerts (via gh api, already enabled on the repo).

Rationale: OWASP dep-check requires NVD API, and the unauthenticated
rate limit was ~3% downloaded after 7 minutes — completion ETA ~4
hours without an API key. OSV-Scanner produces the same coverage in
~5 seconds without any credential, and Dependabot is zero-setup.

Combined findings: 12 total (0 CRITICAL / 4 HIGH / 7 MODERATE / 1 LOW)
across pom.xml + src/main/frontend/package-lock.json. Every finding
has a known fix version.

Key highs:
  - tomcat-embed-core 11.0.20 → 11.0.21 (2 HIGH: JsonAccessLogValve
    encoding, sensitive info in log file)
  - jackson-core 3.1.0 → 3.1.1 (HIGH: document length constraint
    bypass across blocking / async / DataInput parsers)
  - vite 6.4.1 → 6.4.2 (HIGH: arbitrary file read via dev WebSocket —
    dev-only dependency, blast radius is developer machine)

Key moderates include log4j-core × 3 CVEs (→ 2.25.4) and the MCP Java
SDK's hardcoded wildcard CORS (→ mcp-core 1.1.1).

Dependabot on its own surfaced only the 2 npm vite CVEs; OSV caught the
10 Maven findings Dependabot had not yet raised on this repo. Treating
the two scanners as complementary sources.

Updated BASELINE.md:
  - §Vulnerability scan replaces §OWASP dependency-check with the
    12-row CVE table + per-finding fix version + remediation shape
    (most clear with a Spring Boot 4.0.6+ patch bump).
  - Critical "OWASP dependency-check failed" gap marked RESOLVED via
    alternative tooling.

Raw artifacts (gitignored): raw/osv-scan.json (full OSV output),
raw/vuln-scan-summary.json (distilled).
@aksOps aksOps force-pushed the phase-a/vuln-scan branch from ba059d4 to 6118ab6 Compare April 17, 2026 13:04
@aksOps aksOps merged commit 066d870 into main Apr 17, 2026
5 of 6 checks passed
@sonarqubecloud

Copy link
Copy Markdown

aksOps added a commit that referenced this pull request Apr 23, 2026
* refactor(config): centralize CLI startup overrides in a config-package helper

Collapse the four production call sites that mutate the CodeIqConfig Spring
singleton (ServeCommand, EnrichCommand, CliOutput, Analyzer) through a single
package-adjacent helper. This pins the "mutation happens once at CLI startup"
contract in one place and sets up a follow-up commit to tighten the bean's
setter visibility to package-private.

- New CliStartupConfigOverrides with applyServeOverrides / applyCacheDir /
  applyServiceName. Null/blank inputs are no-ops — never overwrite an
  in-code default with an absent value.
- Analyzer.runSmartWithCache now routes service-name propagation through
  the helper (same semantics, same guard condition).
- Six unit tests verify each helper mutates only the intended fields on a
  freshly-adapted CodeIqConfig and that null/blank inputs are no-ops.

* refactor(config): tighten CodeIqConfig setter visibility to package-private

Drop `public` from every setter on CodeIqConfig and its Graph inner class.
Production mutation is now restricted at compile time to:
  - UnifiedConfigAdapter.toCodeIqConfig (once, at Spring startup)
  - CliStartupConfigOverrides (once per JVM, at CLI entry)

Both live in `io.github.randomcodespace.iq.config` and reach the
package-private setters directly. Every other code path — controllers,
MCP tools, background workers — loses the compile-time ability to mutate
the Spring singleton. This is the mutation hazard cleanup #49 called for.

Test migration:
- Two in-package tests (CodeIqConfigTest, GraphBootstrapperTest) keep
  working unchanged.
- 15 out-of-package test classes across `iq.api`, `iq.cli`,
  `iq.intelligence.*`, `iq.mcp`, `iq.query` are migrated to route setter
  calls through a new test-only helper CodeIqConfigTestSupport (lives in
  src/test/java/io/github/randomcodespace/iq/config/, so tests compile
  against the package-private setters). Fluent API keeps call sites
  readable: `CodeIqConfigTestSupport.override(config).rootPath(x).done();`
  The name makes the test-only intent unmistakable and the helper is not
  reachable from production code paths.
- 51 call sites rewritten; semantics preserved verbatim.

Full suite green: 3278 tests, 0 failures, 31 skipped (baseline unchanged).
@aksOps aksOps deleted the phase-a/vuln-scan branch April 26, 2026 05:52
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