Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Attestation predicate reads `project_config.project_type`, which `ProjectConfig` does not define

Aperta
#521 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@mlieberman85 ci sta già lavorando.

Dal 16/10/2026.

  • #614 di @mlieberman85 — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
security

Direzione di ricerca

Read packages/darnit-baseline/src/darnit_baseline/attestation/predicate.py alongside the ProjectConfig schema at packages/darnit/src/darnit/config/schema.py, then inspect the predicate callers and existing tests. Add coverage for building a predicate with a real ProjectConfig; done means the predicate no longer raises and its no-config type behavior is decided and documented in the predicate changelog.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

module-baseline quality

packages/darnit-baseline/src/darnit_baseline/attestation/predicate.py:147 builds the predicate with:

"project_type": project_config.project_type if project_config else "software",

ProjectConfig (packages/darnit/src/darnit/config/schema.py) has a type field, not project_type (create_minimal_config(..., project_type=...) maps its argument to type=). When a project configuration is passed (attestation/__init__.py:22, attestation/generator.py:92), this raises AttributeError instead of producing a predicate. It has gone unnoticed because the common paths pass None and fall back to "software".

Proposed fix:

  • Read project_config.type.
  • Decide whether the "software" fallback is right when no configuration exists: it states a project type nobody confirmed. Omitting the field, or recording it as unknown, may be more accurate. This is a predicate field, so the change is observable by attestation consumers and should be noted in the predicate's changelog.
  • Add a test that builds a predicate with a real ProjectConfig.
Lingua principale
Python
Stelle
22
Fork
27
Merge medio
2g 2h
PR unite (30g)
50

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di darnitdevorg/darnit

Tutte le issue di darnitdevorg/darnit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.