Skip to content

V0.2 - #87

Merged
eaglei15 merged 16 commits into
integfrom
v0.2
Jul 20, 2026
Merged

V0.2#87
eaglei15 merged 16 commits into
integfrom
v0.2

Conversation

@eaglei15

Copy link
Copy Markdown
Collaborator

No description provided.

j.west and others added 16 commits March 25, 2026 16:14
V0.2 Regression hardening and CLI output contract cleanup
…ility

feat: adding logic to enable use with earlier supported python versions
Merge pull request #79 from GenAI-Security-Project/v0.2
)

v0.2 carries the same scoring bug as main: the component_basic
external_references field uses the singular jsonpath
$.component.externalReferences (field_registry.json), and the fallback
presence check in scoring.py compares the snake_case registry name against
the camelCase BOM key, so a populated externalReferences array under
components[0] is scored as missing.

- field_registry.json: jsonpath -> $.components[0].externalReferences
  (scoring/detection path only; aibom_generation.location left untouched,
  consistent with the convention v0.2 already uses).
- scoring.py: a registry-name -> BOM-key alias map for the fallback check
  (also covers component_version -> version).
- tests/test_scoring.py: a positive regression (detection under
  components[0] via both jsonpath and fallback) and a negative guard.

Confirmed the regression reproduces on v0.2 (positive test fails before the
change) and all of tests/test_scoring.py passes after it.
Add two format-agnostic, repo-level distribution attributes extracted from
the HuggingFace file listing:

  * model_file_size     — total bytes of all weight files
  * runtime_requirement — "python" (safetensors/PyTorch/etc. loadable from a
                          Python ML stack) or "llm-stack" (GGUF/GGML-only,
                          needs llama.cpp/Ollama)

- model_file_extractors.py: new extract_distribution_metadata() runs for every
  repo regardless of weight format
- extractor.py: wire into EnhancedExtractor (REPOSITORY_FILES / HIGH confidence)
- service.py: emit as CycloneDX properties under the custom
  owasp:aibom:distribution namespace (kept out of the official genai:aibom
  namespace, which forbids unofficial names)
- field_registry.json: register both as supplementary-tier fields
- result.html: render a friendly "Deployment & Hardware" section
…backend

- Switch summarization model from google/flan-t5-small to facebook/bart-large-cnn
- Fix prompt-leak bug: BART is a summarization model, not instruction-following.
  Feed it document text only (never an instruction prompt), which it would
  otherwise echo into the output and hallucinate generic summaries. Add
  _strip_prompt_leak() as defense-in-depth
- Add optional instruction-tuned backend via Ollama
  (AIBOM_SUMMARIZER_BACKEND=ollama), falling back to BART on any failure
- Guard against BART hallucination on short inputs (<280 chars): return the
  clean extract instead of abstracting
- Penalize quant-repackaging marketing text; strip markdown emphasis/headings;
  add no_repeat_ngram_size to stop repetition loops
fix(scoring): detect externalReferences under components[0] on v0.2 (#76)
Signed-off-by: Dmitry Raidman <eaglei15@gmail.com>
feat: Add training data transparency flags with HF Hub verification
test_training_data_flag_with_datasets and _without_datasets live in
TestProcessLicenses, whose setUp does not mock hf_api. Setting
self.service.hf_api.model_info.return_value on the real bound method
raised AttributeError. Mock hf_api in each test before use.
@eaglei15
eaglei15 merged commit 91da584 into integ Jul 20, 2026
1 check passed
@eaglei15
eaglei15 deleted the v0.2 branch July 20, 2026 19:55
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.

4 participants