Repository navigation
Conversation
rollup.py merges the inventory.json published by every repository's asset-inventory-latest release into one register: assets.json with the repo attached to each record, owners.md (assets per owner, project and environment), unowned.md (tag violations or a team-* owner missing from policies/tags/teams.yml), data-classes.md (confidential and restricted), the org diagram through the asset-inventory renderer, summary.md and SHA256SUMS. Inventories older than stale-days are flagged. asset-register-rollup.yml runs daily: a read-only GitHub App token (falling back to GITHUB_TOKEN for public repositories) lists the org's repositories, downloads and checksum-verifies each inventory, runs the composite, publishes asset-register-latest plus a dated tag with 90 retained, and opens, updates or closes the "Asset register: unowned or stale assets" issue. Nothing in the run can write to a consuming repository. policies/tags/teams.yml starts empty, which accepts any team-* owner until the real team names are filled in. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF
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.
Closes #116. Stacked on #165 (
issue-115-asset-inventory) for the inventory schema and DOT renderer; retarget once that merges.What
.github/actions/asset-register/rollup.py(stdlib; imports the grouping and DOT code from the siblingasset-inventory/inventory.py): merges oneinventory.jsonper repository intoassets.json(per-repo rows withgenerated_at,stack_kind, counts,age_days,stale; every resource record withrepoandunowned_reason),owners.md,unowned.md(tag violations, or ateam-*owner not inpolicies/tags/teams.yml;@sparkgeo.comowners pass),data-classes.md(confidential and restricted only),register.dot/register.svg(nodes labelled with their repo),summary.mdandSHA256SUMS. Unreadable inventories are skipped with a warning. Outputsrepo-count,unowned-count,stale-count,summary-path; exit 0 always.policies/tags/teams.yml: starts asteams: [], which accepts anyteam-*owner; fill in the real team names after merge so unknown teams surface inunowned.md.asset-register(installs graphviz if missing, uses the bundled team list by default).asset-register-rollup.yml: daily plusworkflow_dispatch, this repo only,contents: writeandissues: write. Mints a read-only token withactions/create-github-app-token(contents: read,metadata: read) fromASSET_REGISTER_APP_IDandASSET_REGISTER_APP_PRIVATE_KEY, falling back toGITHUB_TOKENwith a warning (public repos only). Lists non-archived org repos, downloadsinventory.jsonandSHA256SUMSfrom eachasset-inventory-latestrelease, verifies withsha256sum -c --ignore-missing, runs the composite, publishesasset-register-latestandasset-register-YYYY-MM-DD(same recreate-and-prune shell as the threat-feeds mirror, 90 kept), and opens or comments on "Asset register: unowned or stale assets" while anything is unowned or stale, closing it on a clean run. zizmor'sgithub-appaudit is ignored on theowner:line with the reason: the register has to read every repository, and the token is read-only with the minimum two permissions.docs/asset-inventory.md;actions/create-github-app-tokenrow indocs/approved-actions.md; README rows and section.Asset Registerjob: fixture suite plus the composite on the fixtures with output, SVG and checksum assertions.Tests
tests/asset-register/run.sh: three fixture repositories (fresh and clean; fresh with a violation; 22 days old with an owner outside the team list and an email owner), merged counts and ordering, unowned reasons, stale warning,owners.md,unowned.mdanddata-classes.mdrows, summary heading, DOT snapshot,SHA256SUMSround-trip, no team list,--stale-days 30, empty input, and a brokeninventory.json.Deferred
policies/tags/teams.yml. First live run viaworkflow_dispatchafter merge (empty register until repositories publish inventories through Asset inventory and tag-grouped diagram from plan and synth output (#115) #165).🤖 Generated with Claude Code
https://claude.ai/code/session_01NPH9145e4gFo6bmXvMgBoF