Skip to content

ci: discover audit sources#38

Open
jerrysxie wants to merge 2 commits into
OpenDevicePartnership:mainfrom
jerrysxie:auto-discovery
Open

ci: discover audit sources#38
jerrysxie wants to merge 2 commits into
OpenDevicePartnership:mainfrom
jerrysxie:auto-discovery

Conversation

@jerrysxie

Copy link
Copy Markdown
Contributor

Update the vet aggregation workflow to discover public audit sources across the organization and include sources.list changes in the automated PR.

This keeps the central audit list current as repositories add supply-chain audits.

Assisted-by: GitHub Copilot:claude-opus-4.8

Update the vet aggregation workflow to discover public audit sources
across the organization and include sources.list changes in the
automated PR.

This keeps the central audit list current as repositories add
supply-chain audits.

Assisted-by: GitHub Copilot:claude-opus-4.8
Copilot AI review requested due to automatic review settings June 18, 2026 23:56
@github-project-automation github-project-automation Bot moved this to In progress in ODP v0.2 Jun 18, 2026
@jerrysxie jerrysxie marked this pull request as ready for review June 18, 2026 23:56
@jerrysxie jerrysxie requested a review from a team as a code owner June 18, 2026 23:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the vet-aggregate GitHub Actions workflow to automatically discover new cargo-vet audit sources across the OpenDevicePartnership organization and include sources.list changes in the automated aggregation PR.

Changes:

  • Add an org-wide discovery step that scans public, non-archived, non-fork repos for supply-chain/audits.toml and appends new raw URLs to sources.list.
  • Update PR creation logic to consider diffs in both sources.list and audits.toml, and commit both files when changed.
  • Refresh workflow header comment and PR body text to reflect discovery + aggregation behavior.

Comment thread .github/workflows/vet-aggregate.yml Outdated
Comment thread .github/workflows/vet-aggregate.yml Outdated
felipebalbi
felipebalbi previously approved these changes Jun 18, 2026

@felipebalbi felipebalbi left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

RobertZ2011
RobertZ2011 previously approved these changes Jun 19, 2026
Resolve each repository's default branch from the org repo listing
instead of issuing a separate per-repo API request, removing an N+1
call pattern that grew API usage as the org expands.

URL-encode the branch before interpolating it into the git/trees
endpoint so default branches containing a slash resolve as a single
path segment, and emit a warning when the tree listing fails instead
of silently skipping the repository.

Assisted-by: GitHub Copilot:claude-opus-4.8

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +67 to +81
paths=$(echo "$tree" \
| jq -r '.tree[].path | select(test("(^|/)supply-chain/audits\\.toml$"))')

for path in $paths; do
# Skip paths nested deeper than five directory levels.
depth=$(echo "$path" | awk -F/ '{print NF}')
[ "$depth" -le 6 ] || continue

url="https://raw.githubusercontent.com/$ORG/$repo/refs/heads/$branch/$path"
if ! grep -qxF "$url" sources.list; then
echo "$url" >> sources.list
echo "Discovered new source: $url"
added=$((added + 1))
fi
done
Comment on lines +62 to +66
if ! tree=$(gh api "repos/$ORG/$repo/git/trees/$encoded_branch?recursive=1" 2>/dev/null); then
echo "::warning::Failed to list tree for $ORG/$repo@$branch; skipping" >&2
continue
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

4 participants