Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`darnit validate` crashes on openssf-baseline.toml summarising levels

Open Beginner friendly
#589 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@i-am-paradox is already working on this.

Since Oct 13, 2026.

  • #597 by @i-am-paradox — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Read packages/darnit/src/darnit/cli.py, especially cmd_validate and the level grouping near line 416; compare it with how darnit audit reads levels from tags. Reproduce with the bundled openssf-baseline.toml using the steps in the issue. Done means darnit validate exits 0 and prints the per-level breakdown for controls whose level is stored in tags.

Written by the indexing model from the issue text.

Description

needs triage

Description

darnit validate on the bundled openssf-baseline.toml reports the framework as valid, then raises a TypeError and exits non-zero. The level breakdown in cmd_validate (packages/darnit/src/darnit/cli.py) groups controls by ctrl.level. The baseline TOML now keeps the level in tags, so ctrl.level is None for those controls, and sorted() fails when the keys mix int and None. darnit audit reads the level from tags and reports it correctly.

Steps to Reproduce

  1. pip install "darnit-mcp==0.1.1" "darnit-core==0.1.1" "darnit-baseline==0.1.1"
  2. darnit validate "$(python -c 'import importlib.resources as r; print(r.files("darnit_baseline") / "openssf-baseline.toml")')"

Expected Behavior

Exit 0 with the per-level breakdown.

Actual Behavior

INFO: Framework 'openssf-baseline' is valid
INFO:   Controls: 66
INFO:   Adapters: 0
Traceback (most recent call last):
  File "/opt/darnit/lib/python3.13/site-packages/darnit/cli.py", line 416, in cmd_validate
    logger.info(f"  By level: {', '.join(f'L{k}={v}' for k, v in sorted(by_level.items()))}")
TypeError: '<' not supported between instances of 'int' and 'NoneType'

Environment

  • darnit version: 0.1.1
  • Python version: 3.13
  • OS: Debian trixie (Docker)

Additional Context

We hit this running darnit in Alpha-Omega's scrutineer, which bundles it in its runner image for an OpenSSF Baseline compliance scan, with darnit validate as a build-time smoke test. The same code is still on main at 24a4fed. Reading the level as ctrl.level or ctrl.tags.get("level") there would match what the audit path does.

Dominant language
Python
Stars
22
Forks
27
Avg merge
1d 20h
Merged PRs (30d)
39

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from darnitdevorg/darnit

All issues in darnitdevorg/darnit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.