chore: harden dprint config and CI permissions#59
Merged
Conversation
The test, build, and clang-tidy jobs only use actions/cache and upload-artifact, neither of which needs the actions scope. Drop it for least privilege.
There was a problem hiding this comment.
Pull request overview
Hardens local formatting and GitHub Actions permissions by preventing dprint fmt from touching vendored/submodule trees and tightening CI job token scopes.
Changes:
- Add
excludespatterns todprint.jsonto avoid formatting files inlib/,build/, andvcpkg_installed/. - Remove
actions: writefrom thetest,build, andclang-tidyjobs’permissionsblocks inci.yml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dprint.json | Adds exclude globs so repo-local formatting doesn’t recurse into submodules/build outputs. |
| .github/workflows/ci.yml | Drops unused actions: write job permission to reduce CI token privileges. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Two small, independent hardening changes (one commit each).
Exclude submodules and build dirs from dprint
dprint.json'sincludes: ["README.md"]glob matches everyREADME.mdin the tree, so a baredprint fmtrecurses into thelib/submodules (commonlibsse-ng,vcpkg,skse-mcp) and reformats their READMEs, dirtying the working trees. The CIdprint checkand the pre-commit hook are unaffected because they pass explicit paths — but a localdprint fmthits it. Addsexcludes: [lib/**, build/**, vcpkg_installed/**].Drop unused
actions: writepermissionThe
test,build, andclang-tidyjobs inci.ymlonly useactions/cacheandupload-artifact, neither of which needs theactionsscope. Removed for least privilege. (release.ymlalready omits it.)Verification
dprint fmtnow touches nothing; submodules stay clean;dprint checkstill passes on the repo's own docs.ci.ymlstill parses as valid YAML.