Skip to content

docs(vendor): adopt the vendor-policy kit from motofreedom - #1

Merged
bqw371 merged 1 commit into
mainfrom
docs/vendor-policy-adoption
Nov 28, 2026
Merged

bqw371 merged 1 commit into
mainfrom
docs/vendor-policy-adoption

Conversation

@bqw371

@bqw371 bqw371 commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Summary

Ports the vendor-policy adoption kit from bqw371/motofreedom (merged there
in PRs morluto#166 / morluto#176 / morluto#182 / morluto#190 / morluto#191 / morluto#193 / morluto#194 on 2026-11-28).
Governs how a new upstream enters third_party/<name>/ with provenance,
GPL subtree isolation, scrub regexes, supply-chain hygiene, and a boundary
CI check. Operator asked for adoption across repos; REA fits because it
already vendors 10 upstreams.

Change and scope

Three files:

  • docs/vendor-policy.md — import boundary, GPL-3.0 carve-out, exact-commit ingestion rule, 5 immediate supply-chain items and 5 tooling-gated items deferred until triggered. Scrub regexes repo-agnostic (keys, bearer tokens, AWS creds) plus JS/TS-flavoured (hardcoded process.env.*_KEY, npm_<token>, .npmrc auth tokens, bearer in fixtures). Omits motofreedom's hardware-identifier regexes (serial/IMEI/keybox) — REA's domain is binary analysis, not device operator state.
  • .github/PULL_REQUEST_TEMPLATE/vendor.md — cut 5-field template (upstream URL, 40-char SHA, SPDX id, scrub-clean yes/no with pasted grep, GPL-family yes/no ack). Two reviewers in the upstream cohort recommended the cut version for repos with modest reviewer load; REA fits.
  • .github/workflows/ci.yml — new vendor-boundary job greps src/ and bridge/ for TS/JS and Python imports of third_party/. Draft-PR skip matches the rest of the workflow. Added to the required: aggregate's needs: list. scripts/ci/required.mjs fails on any non-skipped failure/cancelled result, so the gate catches regressions automatically.

Verified on current main that no src/ or bridge/ file imports a third_party/ path, so the boundary CI is green from day one.

Skipped .github/labeler.yml from the kit: REA has no actions/labeler workflow installed, so a labeler config would be dead scaffolding.

GPL-3.0 subtree carve-out

Not applicable today. third_party/ghidra-nativeaot is Washi1337/ghidra-nativeaot, which is MIT-licensed (Ghidra .NET Native AOT Analyzer plugin, not a Ghidra fork). This is already recorded correctly in THIRD_PARTY_NOTICES.md. The policy still documents the carve-out so a future GPL-family upstream has the mechanism ready.

Upstream LICENSE / provenance audit (10 existing third_party/ entries)

Submodule LICENSE files live upstream and only appear on disk after git submodule update --init; the gate below is whether REA records license + pinned commit SHA somewhere in-tree (per-upstream README, third_party/README.md, or THIRD_PARTY_NOTICES.md).

Upstream Submodule License recorded Provenance in-tree
binwalk yes MIT (third_party/README.md) third_party/README.md — SHA 4fdab3d4…, v3.1.0
evmole no MIT (third_party/evmole/LICENSE) third_party/evmole/README.md — pins npm 0.9.6 + commit 9eff02da…
ghidra-nativeaot yes MIT (THIRD_PARTY_NOTICES.md) gap — not listed in third_party/README.md, no third_party/ghidra-nativeaot/README.md
jadx-headless-mcp yes Apache-2.0 (third_party/README.md) third_party/README.md — SHA 2b2a560e…, v0.8.0
pwndbg no MIT (third_party/pwndbg/LICENSE.md) third_party/pwndbg/README.md — SHA 55596aa6…, 2026.09.15
pwntools no MIT / Public domain / GPL-2.0 (third_party/pwntools/README.md table) third_party/pwntools/README.md — docs caller-supplied pwntools/pyelftools/Unicorn
unblob yes MIT (third_party/README.md) third_party/README.md — SHA 1fcc7a0a…, 26.6.4
wabt no Apache-2.0 (third_party/wabt/README.md) third_party/wabt/README.md — SHA ff0ef7e0…, 1.0.42
wakaru yes Apache-2.0 (upstream pionxzh/wakaru) gap — not listed in third_party/README.md, no third_party/wakaru/README.md
web-network-captures no mixed (ISC, MIT, Apache-2.0 per npm pin) third_party/web-network-captures/README.md — documents 6 upstream packages

Provenance gaps for a human to fill

  1. third_party/ghidra-nativeaot/ — add a short README.md (or a row in third_party/README.md) recording the upstream URL https://github.com/Washi1337/ghidra-nativeaot, pinned commit effeb734fc570c32650f88b159608979dc7b423e, and the MIT license. Note: THIRD_PARTY_NOTICES.md already preserves the MIT notice, so this is a provenance-doc gap, not a license gap.
  2. third_party/wakaru/ — add a README.md recording the upstream URL https://github.com/pionxzh/wakaru, pinned commit 8219bf5016a063d7fb215101a8c45d5959ec733f, and the Apache-2.0 license, plus whatever REA's adapter actually consumes from it.

Neither gap is a blocker for this policy PR — the policy sets the expectation forward; the gaps are a backfill task. Flagging for a maintainer to decide whether to fold into this PR or follow up.

Validation performed

  • python3 -c 'import yaml; yaml.safe_load(open(".github/workflows/ci.yml"))' — OK.
  • grep -rnE "(from|require|import)\s*\(?\s*['\"][^'\"]*third_party/" src/ bridge/ — zero matches; vendor-boundary passes on current tree.
  • grep -rnE "^\s*(from|import)\s+third_party[._]" src/ bridge/ — zero matches.
  • Confirmed scripts/ci/required.mjs fails on any failure/cancelled result among needs (line 81-86), so vendor-boundary is enforced by the existing required gate without script changes.
  • Confirmed upstream licenses via gh api repos/{owner}/{repo} --jq '.license.spdx_id' for Washi1337/ghidra-nativeaot (MIT) and pionxzh/wakaru (Apache-2.0).

Compatibility, safety, and release

  • No breaking changes. Adds one CI job and two docs; no code or build-system changes.
  • No new npm deps, no lockfile changes.
  • .github/CODEOWNERS already routes third_party/ and .github/workflows/ edits to maintainers; policy edits remain gated.

🤖 Generated with Claude Code

… CI, PR template

Imported from motofreedom's vendor-policy-adoption-kit.md. Adapted for
TypeScript source roots, added JS/TS scrub patterns (hardcoded API
keys, npm tokens), kept the cut-down 5-field PR template.

GPL-3.0 subtree carve-out: not applicable. third_party/ghidra-nativeaot
is Washi1337/ghidra-nativeaot (MIT), a Ghidra plugin and not a Ghidra
fork; THIRD_PARTY_NOTICES.md already records it as MIT. Policy still
documents the carve-out because future upstreams may trigger it.

10 existing third_party/ upstreams covered from day one by the
boundary CI job.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T06:13:14.769925Z
We couldn’t complete this review. Comment @codex review to try again.
f64c4d4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 06cbebc9-a26c-4e3e-8cc2-f1c9c33761e5
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@bqw371
bqw371 merged commit e01d1a2 into main Nov 28, 2026
1 check passed
bqw371 added a commit that referenced this pull request Nov 28, 2026
`if grep …; then exit 1; fi` only catches exit 0. grep exits 2 on
missing dir / unreadable file / zsh word-splitting on some runners.
Silent success on a grep error means the vendor-boundary enforcement
decays to honor-system with no CI signal.

Capture grep's exit code explicitly and treat 0=violation (exit 1),
1=no match (pass), anything else=check failure (exit 1 with a
descriptive message). Pin the step's shell to bash so a runner
switched to dash can't silently change semantics.

Fixes the same shape in both call sites added by #1
(in-ci.yml job) and #2 (standalone workflow).

Pattern from motofreedom PR morluto#265.

Co-authored-by: Jonathan Henson <[email protected]>
Co-authored-by: Claude Opus 4.7 <[email protected]>
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.

1 participant