Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/catalog-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Catalog validation

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run catalog validator tests
run: python -m unittest discover -s tests -p 'test_*.py' -v
- name: Validate catalog structure
run: python scripts/catalog_audit.py --root .
32 changes: 19 additions & 13 deletions Audit_Reports/Security_Audit_Summary.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
# Zero Trust Security Audit Report
# Historical Local Catalog Scan Report

## Summary
**Status:** CLEAN
**Original scan timestamp:** 2026-04-24 04:04:32 UTC
**Status:** Historical result, not a current security certification.

As of this audit, the automated security scanning tools have returned zero immediate critical findings for the repository files.
## Scope

- **Total Vulnerabilities (Semgrep):** 0
- **Total Secrets/Leaks (Gitleaks):** 0
- **Audit Timestamp:** 2026-04-24 04:04:32
The historical report recorded zero findings from Semgrep's `p/default` ruleset and Gitleaks when scanning the local catalog's Markdown and metadata files at that time.

## Methodology
The audit was conducted using the following industry-standard automated security analysis tools:
The scan did **not** inspect the source code, dependencies, build workflows, commit history, secrets, or security posture of the upstream repositories linked by catalog cards. It did not establish that the listed projects are safe, maintained, official, or licensed for reuse.

1. **Semgrep**: A fast, open-source, static analysis tool for finding bugs and enforcing code standards. Scanned using the 'p/default' ruleset.
2. **Gitleaks**: A SAST tool for detecting and preventing hardcoded secrets like passwords, api keys, and tokens in git repos.
## Current reproducibility

## Conclusion
No high-risk security violations or leaked credentials were detected in the processed digital library metadata and markdown files. Continuous monitoring is recommended as new repositories are indexed.
The original automated discovery scripts described in older README text are not present in this repository. A local catalog validator is now available:

```bash
python scripts/catalog_audit.py --root .
python -m unittest discover -s tests -p 'test_*.py' -v
```

This validator checks local Markdown card structure and URL syntax only. It performs no network requests and does not replace Semgrep, Gitleaks, dependency scanning, upstream source review, or legal review.

## Interpretation

The historical zero-finding result is limited to the local files and rules used on the original scan date. It must not be described as a clean security audit of every linked project. A fresh scan should record tool versions, exact scope, rulesets, commit SHA, and results.
75 changes: 36 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,50 @@
<div align="center">
<h3>🏛️ Official Borrell & Huffman LLC Enterprise Portfolio</h3>
<p><i>This repository is a verified public asset of the Borrell & Huffman Intellectual Property Ecosystem.</i></p>
<p>
<img src="https://img.shields.io/badge/Enterprise-Borrell_%26_Huffman-blue.svg?style=for-the-badge" alt="Enterprise ID">
<img src="https://img.shields.io/badge/Status-Public_Showcase-success.svg?style=for-the-badge" alt="Status">
<img src="https://img.shields.io/badge/Clearance-Unclassified-yellow.svg?style=for-the-badge" alt="Clearance">
</p>
</div>
# Protocol Helios

---
Protocol Helios is a curated index of public GitHub repositories associated with government agencies and public-sector research. It organizes repository cards by agency and by technical interest area to make discovery and manual review easier.

# SB26-189 Compliance Boilerplate
**This repository is a catalog, not a security audit service.** Listing a repository does not mean that it is safe, maintained, official, endorsed, or suitable for production use.

## Pre-Decision Notice
**[Insert this notice prominently before a user engages with the system]**
## Catalog structure

> **NOTICE OF AUTOMATED DECISION-MAKING TECHNOLOGY (ADMT)**
> Please be aware that this system uses an Automated Decision-Making Technology (ADMT) to materially influence a consequential decision affecting you. For more information on how this ADMT works and how your data is used, please see our [Link to full documentation/privacy policy].
- `By_Agency/`: repository cards grouped by the agency or organization associated with the upstream GitHub owner.
- `By_Interest_Area/`: a second index grouped by technical subject.
- A repository may intentionally appear in both indexes. The cards are metadata summaries and links; upstream source code remains at its original location.

---
Each card should include a repository title, short description, canonical GitHub URL, matched discovery keywords, and upstream topics.

## Post-Adverse Decision Explanation
**[Provide this explanation within 30 days of an adverse outcome]**
## Validate the local catalog

> **EXPLANATION OF ADVERSE DECISION**
>
> **The Decision:** You have received an adverse outcome regarding [State the specific decision, e.g., your application, eligibility, etc.].
>
> **Role of ADMT:** This decision was materially influenced by our Automated Decision-Making Technology (ADMT), known as [Insert Name of ADMT], version [Insert Version Number], developed by [Insert Developer Name]. The ADMT processed the following types of personal data from these sources: [List types and sources of data].
>
> **How to Request More Information or Exercise Your Rights:** You have the right to request additional information regarding this decision and the ADMT used. You may also exercise your consumer rights under Colorado law, including the right to correct data or opt-out. To do so, please follow this process: [Insert simple-to-follow instructions, e.g., click here, email us at X, or fill out this form].
Requirements: Python 3.11 or newer. No third-party packages or network access are required.

```bash
python scripts/catalog_audit.py --root .
python -m unittest discover -s tests -p 'test_*.py' -v
```

# Protocol Helios
The validator checks local Markdown structure, GitHub URL syntax, title/URL consistency, missing metadata, duplicate references, and taxonomy aliases. Its November 3, 2026 baseline validated 625 cards with zero structural errors or metadata warnings. It found 285 expected cross-index references and no same-index duplicates. It does not contact GitHub or confirm upstream status.

See [Catalog Schema and Validation](docs/CATALOG_SCHEMA.md) for the record format, taxonomy normalization, and limitations.

## Research methodology and limits

The catalog's historical discovery process used repository metadata and keyword matching. The original PyGithub discovery scripts are not present in this repository, so automated upstream discovery and categorization are not currently reproducible from this checkout.

Keyword matches are discovery hints, not proof that a repository belongs in a category. For example, a generic match such as `ML` can produce false positives. Categories should be reviewed by a human and normalized over time.

The catalog may contain archived, deprecated, inactive, or unlicensed upstream projects. Before using a listed project:

1. Open the upstream repository and verify its owner and current status.
2. Check archived/deprecated notices and recent maintenance activity.
3. Read the upstream license and security policy.
4. Review source code and dependencies independently.
5. Confirm that the project is appropriate for the intended environment.

## Mission Statement
Protocol Helios is a curated digital library designed for the comprehensive auditing of government-affiliated software repositories. Guided by Zero Trust principles, this initiative focuses on enhancing AI/Cybersecurity research by systematically identifying and analyzing critical software mechanisms developed by public agencies.
The historical [local metadata scan report](Audit_Reports/Security_Audit_Summary.md) describes only the catalog files scanned at that time. It does not report the security posture of linked repositories.

## Directory Structure
To facilitate efficient navigation and research, the library is organized into two primary hierarchies:
## Security and reporting

- **By_Interest_Area/**: Repositories categorized by technical domains such as AI Agents, Automation, Reverse Engineering, Malware Analysis, and Security Architecture.
- **By_Agency/**: Repositories organized by their parent government organization (e.g., NSA, CISA, NASA), providing a clear overview of agency-specific software outputs.
See [SECURITY.md](SECURITY.md) for vulnerability reporting. Do not submit credentials, personal data, or sensitive exploit details in public issues.

## Methodology
Repositories are identified and indexed using automated scripts leveraging the `PyGithub` library. The selection process involves:
1. **Discovery**: Scanning known government GitHub organizations.
2. **Filtering**: Using a targeted list of interest keywords (e.g., 'vulnerability research', 'LLM', 'framework') to identify relevant projects.
3. **Categorization**: Extracting metadata, descriptions, and topics to populate the hierarchical filing system with detailed markdown summaries.
## License and terms

## Navigation
Each folder contains Markdown summaries of identified repositories, including their descriptions, matched keywords, and direct links to the source code for auditing purposes.
The repository includes a license file and separate terms. Review both before redistribution or commercial use. The terms contain proprietary-language statements that should be reconciled with the repository license by the maintainer; this README does not claim that the legal position is settled.
42 changes: 42 additions & 0 deletions docs/CATALOG_SCHEMA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Catalog Record Schema and Validation

## Current Markdown card shape

Each indexed repository is represented by a Markdown card with:

- A title in `owner/repository` form.
- A concise description.
- One canonical HTTPS GitHub repository URL.
- Matched discovery keywords.
- Upstream topics, or an explicit `None`.

The same upstream repository may appear once under `By_Agency` and once under `By_Interest_Area`. Those cross-index references are intentional. Multiple references within the same index should be reviewed for duplication.

## Local validator

Run:

```bash
python scripts/catalog_audit.py --root .
```

The validator checks local card structure, canonical GitHub URL syntax, title/URL consistency, missing metadata, duplicate references, and interest-area taxonomy aliases. It performs no network requests.

## Taxonomy normalization

Current aliases include `ml`, `ML`, and `machine_learning` mapping to `machine-learning`; `llm` and `LLM` mapping to `large-language-models`; and `dfir`/ `DFIR` mapping to `digital-forensics-incident-response`.

Normalization is reported, not destructively applied to directory names. Existing paths remain stable until a separate migration is reviewed.

## Limits

A syntactically valid link does not prove that an upstream repository exists, is maintained, is safe, is government-operated, or is licensed for reuse. Upstream status, archived/deprecated status, commit freshness, license, security posture, and source authenticity require separate checks. The historical security scan only covered local Markdown/metadata at the time it ran; it did not scan linked upstream repositories.


## Baseline validation: 2026-11-03

The local validator processed **625 catalog cards** with zero structural errors and zero metadata warnings. It found **285 cross-index repository references**, which are expected because the same project may appear in the agency and interest-area indexes. It found no duplicate references confined to a single index.

The normalized interest-area counts include 164 machine-learning cards across the `ml`, `ML`, and `machine_learning` directory aliases, 25 neural-network cards, 9 large-language-model cards, and 2 digital-forensics/incident-response cards across `dfir` and `DFIR`.

These counts describe local catalog organization only. They do not measure upstream repository quality or freshness.
173 changes: 173 additions & 0 deletions scripts/catalog_audit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
#!/usr/bin/env python3
"""Validate the local Markdown catalog without making network requests."""
from __future__ import annotations

import argparse
import json
import re
import sys
from collections import defaultdict
from pathlib import Path
from urllib.parse import urlparse

URL_PATTERN = re.compile(
r"^\*\*URL:\*\*\s*\[([^\]]+)\]\((https?://[^)]+)\)\s*$",
re.MULTILINE,
)
DESCRIPTION_PATTERN = re.compile(r"^\*\*Description:\*\*\s*.+$", re.MULTILINE)
KEYWORDS_PATTERN = re.compile(r"^\*\*Matched Keywords:\*\*\s*.+$", re.MULTILINE)
TOPICS_PATTERN = re.compile(r"^\*\*Topics:\*\*\s*.+$", re.MULTILINE)

TAXONOMY_ALIASES = {
"ml": "machine-learning",
"ML": "machine-learning",
"machine_learning": "machine-learning",
"neural-network": "neural-networks",
"llm": "large-language-models",
"LLM": "large-language-models",
"dfir": "digital-forensics-incident-response",
"DFIR": "digital-forensics-incident-response",
"ai_agent": "ai-agents",
"generative_ai": "generative-ai",
}


def normalize_taxonomy(folder_name: str) -> str:
return TAXONOMY_ALIASES.get(folder_name, folder_name.replace("_", "-").lower())


def canonical_github_repo(url: str) -> str | None:
parsed = urlparse(url)
if parsed.scheme != "https" or parsed.hostname != "github.com":
return None
if parsed.query or parsed.fragment:
return None
try:
port = parsed.port
except ValueError:
return None
if parsed.username or parsed.password or port not in (None, 443):
return None
segments = [segment for segment in parsed.path.strip("/").split("/") if segment]
if len(segments) != 2:
return None
owner, repository = segments
if not re.fullmatch(r"[A-Za-z0-9_.-]+", owner):
return None
if not re.fullmatch(r"[A-Za-z0-9_.-]+", repository):
return None
return f"{owner.lower()}/{repository.removesuffix('.git').lower()}"


def audit_catalog(root: str | Path) -> dict:
root = Path(root).resolve()
index_roots = (root / "By_Agency", root / "By_Interest_Area")
records = []
errors = []
warnings = []
taxonomy_counts: dict[str, int] = defaultdict(int)

for index_root in index_roots:
if not index_root.is_dir():
errors.append(f"Missing catalog directory: {index_root.name}")
continue
index_type = index_root.name
for file_path in sorted(index_root.rglob("*.md")):
relative_path = file_path.relative_to(root).as_posix()
folder = file_path.parent.name
if file_path.parent == index_root:
errors.append(f"Catalog card is not inside a category folder: {relative_path}")
continue
taxonomy = normalize_taxonomy(folder) if index_type == "By_Interest_Area" else None
if taxonomy:
taxonomy_counts[taxonomy] += 1

try:
content = file_path.read_text(encoding="utf-8")
except (OSError, UnicodeDecodeError) as error:
errors.append(f"Cannot read {relative_path}: {type(error).__name__}")
continue

matches = URL_PATTERN.findall(content)
if len(matches) != 1:
errors.append(
f"{relative_path}: expected exactly one canonical URL field, found {len(matches)}"
)
continue

display_url, linked_url = matches[0]
canonical = canonical_github_repo(linked_url)
if canonical is None or display_url.rstrip("/") != linked_url.rstrip("/"):
errors.append(f"{relative_path}: URL must be a canonical https://github.com/owner/repo link")
continue

title_match = re.search(r"^#\s+([^\r\n]+)", content, re.MULTILINE)
if not title_match:
warnings.append(f"{relative_path}: missing Markdown title")
elif title_match.group(1).strip().lower() != canonical:
warnings.append(
f"{relative_path}: title does not match canonical repository {canonical}"
)

if not DESCRIPTION_PATTERN.search(content):
warnings.append(f"{relative_path}: missing description")
if not KEYWORDS_PATTERN.search(content):
warnings.append(f"{relative_path}: missing matched-keywords field")
if not TOPICS_PATTERN.search(content):
warnings.append(f"{relative_path}: missing topics field")

records.append({
"path": relative_path,
"index": index_type,
"repository": canonical,
"taxonomy": taxonomy,
})

paths_by_repo: dict[str, list[str]] = defaultdict(list)
indexes_by_repo: dict[str, set[str]] = defaultdict(set)
for record in records:
paths_by_repo[record["repository"]].append(record["path"])
indexes_by_repo[record["repository"]].add(record["index"])

duplicate_references = [
{"repository": repository, "paths": sorted(paths)}
for repository, paths in sorted(paths_by_repo.items())
if len(paths) > 1
]
cross_index_references = [
item for item in duplicate_references
if len(indexes_by_repo[item["repository"]]) > 1
]
same_index_duplicates = [
item for item in duplicate_references
if len(indexes_by_repo[item["repository"]]) == 1
]

return {
"catalog_cards_validated": len(records),
"errors": errors,
"warnings": warnings,
"duplicate_repository_references": duplicate_references,
"expected_cross_index_references": cross_index_references,
"same_index_duplicates": same_index_duplicates,
"normalized_interest_taxonomy": dict(sorted(taxonomy_counts.items())),
"network_checks_performed": False,
"limitations": [
"This validates local Markdown structure and URL syntax only.",
"It does not confirm that an upstream repository exists, is current, safe, official, or licensed for reuse.",
"Cross-index references are expected in a dual-index catalog; metadata consistency is not guaranteed by URL matching alone.",
],
}


def main(argv=None) -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--root", default=".", help="Catalog repository root")
args = parser.parse_args(argv)
report = audit_catalog(args.root)
print(json.dumps(report, indent=2, sort_keys=True))
return 1 if report["errors"] else 0


if __name__ == "__main__":
raise SystemExit(main())
Loading
Loading