Add GitHub scanner and ai-bom-like CLI/profile ergonomics#34
Merged
akumar0205 merged 1 commit intoMar 25, 2026
Merged
Conversation
akumar0205
deleted the
codex/implement-github-scanner-with-ai-bom-compatibility
branch
March 25, 2026 00:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
ai-bom-style presentation profile so users get concise executive summaries and a terminal-friendly UX without breaking the canonical AIBOM schema.Description
aibom/github_scan.pywhich implementsscan_github_repos()with shallow clone support, repo file ingestion, per-repo output folders, aggregatesummary.json+SUMMARY.md, dataclassRepoScanRecord, gate enforcement (--fail-on,--max-high-risk,--max-unsupported), and robust partial-failure continuation semantics.aibom/presentation.pywhich builds a deterministicai-bom-likecompanion profile (*_ai_profile.json), renders concise text summaries, and produces markdown summary tables for aggregated runs.aibom/cli.pyto addscan-github(with--repo,--repos-file,--branch,--depth,--token-env,--max-repos,--timeout-sec, etc.),--profileongenerateandscan-github(choicescanonical|ai-bom-like), andsummarize --inputfor rendering ai-bom-like text or JSON outputs..github/workflows/aibom.yml(PR drift gate + scheduled multi-repo scan + artifact upload),README.md(quickstart + migration notes),docs/GITHUB_SCANNER_GUIDE.md, andexamples/github_repo_samples/repos.txt.Testing
ruff check .passed andblack --check .passed after formatting updates.PYTHONPATH=. pytest -qwhich passed:52 passed.pip install -e .which failed in this environment due to external package index/proxy restrictions (error: unable to fetch build dependencies such assetuptools), so tests were executed withPYTHONPATH=.instead.PYTHONPATH=. python -m aibom.cli scan-github --repo openai/openai-quickstart-python --output-dir out --profile ai-bom-likewhich returned nonzero due to network/proxy preventinggit clone(clone error/exit status 128) but the scanner exercised error aggregation and producedout/summary.jsonandout/SUMMARY.mdas designed.Files added/changed (high level):
aibom/github_scan.py,aibom/presentation.py,aibom/cli.py(new commands and profile flag), small fixes inaibom/bundle.pyandaibom/utils.pyfor path/cert handling and lint hygiene, new docsdocs/GITHUB_SCANNER_GUIDE.md, updated.github/workflows/aibom.yml,README.md,examples/github_repo_samples/repos.txt, and new/updated tests and fixtures undertests/to cover profile rendering and GitHub scan behaviors.Behavioral differences vs ai-bom and rationale
--profile ai-bom-likeand writes a companion presentation JSON rather than replacing the canonical AIBOM schema to preserve backward compatibility for existing consumers.scan-githubis batch-oriented and CI-friendly: it continues on per-repo errors and emits aggregatedsummary.json+SUMMARY.mdwhile returning a nonzero exit code when any configured gates fail, which improves observability in CI workflows and supports partial success scenarios.new-model,new-tool,new-external-provider+ thresholds) to retain the repo's policy model rather than verbatim external semantics.Codex Task