[audit] Security, AX compliance, missing tests, error handling #3

Open
opened 2026-03-22 16:41:03 +00:00 by Virgil · 1 comment
Member

Full audit:

  1. Security: path traversal, injection, panics on untrusted input, race conditions
  2. AX compliance: os.Getenv → core.Env, filepath.* → core.Path*, fmt.Sprintf → core.Sprintf, strings.* → core.*, errors.New/fmt.Errorf → core.E
  3. Missing tests: exported functions without test coverage
  4. Error handling: silently dropped errors, bare panics, missing nil checks
  5. UK English: American spellings in comments/docs
  6. Missing usage-example comments on exported identifiers
  7. Missing SPDX licence headers

Report all findings with severity and file:line. Do NOT fix.

Full audit: 1. Security: path traversal, injection, panics on untrusted input, race conditions 2. AX compliance: os.Getenv → core.Env, filepath.* → core.Path*, fmt.Sprintf → core.Sprintf, strings.* → core.*, errors.New/fmt.Errorf → core.E 3. Missing tests: exported functions without test coverage 4. Error handling: silently dropped errors, bare panics, missing nil checks 5. UK English: American spellings in comments/docs 6. Missing usage-example comments on exported identifiers 7. Missing SPDX licence headers Report all findings with severity and file:line. Do NOT fix.
Author
Member

Codex Audit Findings

MEDIUM (3)

  1. LoadTrainable calls ModelType() on closed instance — post-close panic, mislabels architecture as backend (training.go:67-68)
  2. ApplyGenerateOpts/ApplyLoadOpts panic on nil option entries — no nil guard (options.go:63-64, :117-118)
  3. Discover silently discards read/parse failures — callers can't distinguish scan failure from no models (discover.go:25-55)
## Codex Audit Findings ### MEDIUM (3) 1. LoadTrainable calls ModelType() on closed instance — post-close panic, mislabels architecture as backend (training.go:67-68) 2. ApplyGenerateOpts/ApplyLoadOpts panic on nil option entries — no nil guard (options.go:63-64, :117-118) 3. Discover silently discards read/parse failures — callers can't distinguish scan failure from no models (discover.go:25-55)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

-

Dependencies

No dependencies set.

Reference
core/go-inference#3
No description provided.