Add security documentation and minimal permissions to workflow examples #2
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.
This PR improves the security posture of the varlock-action by adding comprehensive security documentation and implementing minimal permissions across all workflow examples.
Changes Made
README.md Security Enhancements
New "Required Workflow Permissions" Section
permissions: contents: read
for principle of least privilegeUpdated All Workflow Examples
All 5 workflow examples now include the recommended permissions block:
Enhanced Security Features Documentation
@sensitive
decorator usageJSON Output Security Warning
Added prominent security warning for the JSON output format:
example-workflow.yml Security Updates
permissions: contents: read
blocktest-with-varlock
anddeploy-production
jobsSecurity Impact
These changes significantly improve the security guidance for users by:
The action itself only requires read access to repository contents, making
contents: read
the appropriate minimal permission level for all use cases.Validation
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
ph.varlock.dev
node /home/REDACTED/work/varlock-action/varlock-action/node_modules/.bin/varlock --version
(dns block)node /home/REDACTED/work/varlock-action/varlock-action/node_modules/.bin/varlock load --format json-full
(dns block)node /home/REDACTED/work/varlock-action/varlock-action/node_modules/.bin/varlock load
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
This pull request was created as a result of the following prompt from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.