Skip to content

fix: resolve CodeQL and AI code quality findings#100

Merged
patchloom-release[bot] merged 1 commit into
mainfrom
fix/code-quality-findings
Jun 7, 2026
Merged

fix: resolve CodeQL and AI code quality findings#100
patchloom-release[bot] merged 1 commit into
mainfrom
fix/code-quality-findings

Conversation

@SebTardif
Copy link
Copy Markdown
Contributor

Summary

Resolves all 9 open findings from the GitHub code quality scanners (1 CodeQL standard + 8 AI).

Standard findings (CodeQL)

File Finding Fix
quickActions.test.ts:3 Unused import path Removed

AI findings

File Finding Fix
binary.test.ts:306 Spelling: "urls" should be "URLs" Fixed test name
binary.test.ts:700 Missing URL edge case tests Added tests for query strings, fragments
binary.test.ts:711 Missing protocol-relative URL test Added //github.com/... rejection test
downloadIntegration.test.ts:203 catch (err: any) bypasses type safety Changed to catch (err: unknown) with type guard
propertyBased.test.ts:74 Cryptic variable names ma, mi, pa, mb, mib, pb Renamed to majorA, minorA, patchA, majorB, minorB, patchB
propertyBased.test.ts:126 fc.integer() produces unrealistic exit codes Constrained to { min: 0, max: 255 }

Two AI findings were intentionally not changed:

  • stderr redirect in openssl: The 2>/dev/null suppresses noisy openssl deprecation warnings in test output. Removing it adds noise without value.
  • TLS env var cleanup: The existing after hook already restores the env var correctly; the AI suggestion duplicated the hook.

Testing

222 tests pass (2 new). The 1 pre-existing MCP framing failure is unrelated.

- Remove unused path import in quickActions.test.ts (CodeQL)
- Fix spelling: 'urls' to 'URLs' in test name (AI)
- Add URL edge case tests: protocol-relative, query strings, fragments (AI)
- Replace catch (err: any) with catch (err: unknown) + type guard (AI)
- Use descriptive variable names in version comparison property test (AI)
- Constrain exit code range to 0-255 in formatCliOutput property test (AI)

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
@patchloom-release patchloom-release Bot enabled auto-merge (squash) June 7, 2026 05:58
@patchloom-release patchloom-release Bot merged commit 6cf1a64 into main Jun 7, 2026
19 checks passed
@patchloom-release patchloom-release Bot deleted the fix/code-quality-findings branch June 7, 2026 06:01
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