feat(ci): add dependency license check and attributions - #1063
Merged
RUKAYAT-CODER merged 2 commits intoAug 27, 2026
Merged
Conversation
|
@usmanimamu17-create Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Thank you for contributing to the project. |
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.
Summary
Adds a production-scoped dependency license check to the audit workflow, an allowlist + documented exception process, and an in-app Open Source Licenses screen rendering a generated attribution file. The in-app auditor's stale license blacklist is reconciled to the same allowlist so the merge gate and the auditor agree.
Closes #1031.
Closes #1028
Closes #1029
Closes #1030
Type of Change
What was done
scripts/license-audit.jsscans the transitive production dependency tree vialicense-checker --productionand fails on any package whose license is not allowlisted unless it has an approved exception. Wired into.github/workflows/audit.ymlasnpm run license:check.license-allowlist.json(permissive/store-safe licenses; excludes GPL/AGPL/SSPL/LGPL/CC-BY-SA) andlicense-exceptions.json(per-package approvals) with the review process documented inscripts/README.md-> Dependency Licensing.UNKNOWN/missing licenses are never allowed.npm run attributiongeneratesassets/THIRD_PARTY_NOTICES.jsonfrom the full production tree. New/licensesroute (app/licenses.tsx) renderssrc/components/mobile/LicensesScreen.tsx, reachable via a new Open Source Licenses row under Settings → App inMobileSettings.tsx. A committed baseline snapshot (66 direct production deps) is included so the screen works without a build step; CI regenerates the authoritative full tree.checkLicenseComplianceinsrc/audit/analyzers/NetworkAnalyzer.tsno longer uses a hard-coded blacklist; it reads the samelicense-allowlist.json+license-exceptions.jsonover the production-only scope (was prod+dev). Report shape (licenseCompliance: []in tests) is unchanged.Acceptance Criteria
license:checkstep inaudit.yml, exits non-zero on any non-allowlisted/unexcepted license.scripts/README.md-> Dependency Licensing./licensesscreen reachable from Settings → App.Testing Done
scripts/license-audit.jspassesnode --check;package.json,license-allowlist.json,license-exceptions.json, andassets/THIRD_PARTY_NOTICES.jsonall parse; generated baseline contains 66 direct production deps.licenseCompliance: []tests still valid).license:checkgate itself was NOT executed here:license-checkerrequiresnode_modules, which is not installed on this machine at PR creation time, and CI is not yet green on this repo. The script and NetworkAnalyzer matcher handle AND/OR expressions and read the exact same policy files.Security Considerations
/licensesroute only renders local attribution data (no user-supplied input).Performance Considerations
FlatListused inLicensesScreenfor attribution rows (keyExtractorprovided).license-checkeris a devDependency (not bundled); the attribution screen reads a static JSON snapshot (no runtime network).Checklist