Skip to content

fix(cli): align audit and analyze --fail-on defaults #22

@btwshivam

Description

@btwshivam

audit defaults --fail-on to high, analyze defaults it to empty:

// cmd/optiqor/main.go:217 (analyze)
cmd.Flags().StringVar(&failOn, "fail-on", "", "...")

// cmd/optiqor/main.go:572 (audit)
cmd.Flags().StringVar(&failOn, "fail-on", "high", "...")

same chart, identical findings, different exit codes. analyze returns 0 on a HIGH security finding, audit returns 1. confusing for CI authors who switch between the two.

pick one. either lift "" to audit for parity (recommended, opt-in is honest), or push "high" down into analyze. update the README severity table to match.

Metadata

Metadata

Assignees

Labels

area/cliCobra CLI commands and UXbugSomething isn't workingclaimedSomeone has claimed this via /assigngood first issueGood for newcomerssize/XS10 lines or fewer

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions