-
Notifications
You must be signed in to change notification settings - Fork 36
Add comprehensive strict mode reference documentation #4224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Enhanced frontmatter.md: Added detailed enforcement areas section with 6 specific constraints - Expanded CLI.md: Added dedicated --strict flag section with examples and precedence rules - Updated security.md: Aligned enforcement areas list with other documentation - All three docs now consistently document all 6 enforcement areas: 1. Write permissions (use safe-outputs instead) 2. Network configuration (explicit required) 3. Network wildcards (no * allowed) 4. MCP network (containers need network config) 5. Action pinning (SHA pinning required) 6. Deprecated fields (not allowed) - Added cross-references between frontmatter, CLI, and security docs - Clarified CLI flag vs frontmatter field relationship and precedence - Documentation builds successfully without errors Addresses #4177 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive reference documentation for strict mode across three documentation files. The changes expand the brief mentions of strict mode into detailed sections that explain the CLI flag, frontmatter field relationship, and complete list of enforcement areas.
Key Changes:
- Expanded strict mode documentation with detailed enforcement areas (write permissions, network configuration, wildcards, MCP network, action pinning, deprecated fields)
- Clarified CLI flag vs frontmatter field precedence relationships
- Added cross-references between CLI, reference, and security documentation
- Provided usage examples for the
--strictflag
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/src/content/docs/setup/cli.md | Added dedicated --strict flag section with enforcement areas, precedence rules, examples, and cross-references |
| docs/src/content/docs/reference/frontmatter.md | Expanded strict mode field documentation with detailed enforcement areas, enabling methods, and precedence explanation |
| docs/src/content/docs/guides/security.md | Updated enforcement areas list to match reference docs and added CLI documentation cross-reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 5. **Action Pinning**: Enforces GitHub Actions to be pinned to specific commit SHAs instead of tags or branches. | ||
|
|
||
| 6. **Deprecated Fields**: Refuses use of deprecated frontmatter fields. | ||
|
|
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation lists "Action Pinning" as enforcement area #5, but action pinning is not validated in the validateStrictMode() function in strict_mode_validation.go. Instead, strict mode affects action pinning behavior indirectly through GetActionPinWithData() in action_pins.go (lines 121-127), which returns an error when an action cannot be pinned.
This enforcement happens during the compilation/pinning process, not as part of the centralized strict mode validation checks. The documentation should clarify that action pinning enforcement occurs during compilation, not as a validation check, or consider removing it from the "Enforcement Areas" list to accurately reflect what validateStrictMode() actually validates.
| 5. **Action Pinning**: Enforces GitHub Actions to be pinned to specific commit SHAs instead of tags or branches. | |
| 6. **Deprecated Fields**: Refuses use of deprecated frontmatter fields. | |
| 5. **Deprecated Fields**: Refuses use of deprecated frontmatter fields. | |
| > **Note:** Strict mode also enforces that all GitHub Actions must be pinned to specific commit SHAs (not tags or branches). This enforcement occurs during the compilation process, not as part of the strict mode validation checks. |
| 5. **Action Pinning**: Enforces GitHub Actions to be pinned to specific commit SHAs. | ||
| 6. **Deprecated Fields**: Refuses use of deprecated frontmatter fields. | ||
|
|
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation lists "Action Pinning" as enforcement area #5, but action pinning is not validated in the validateStrictMode() function in strict_mode_validation.go. Instead, strict mode affects action pinning behavior indirectly through GetActionPinWithData() in action_pins.go (lines 121-127), which returns an error when an action cannot be pinned.
This enforcement happens during the compilation/pinning process, not as part of the centralized strict mode validation checks. The documentation should clarify that action pinning enforcement occurs during compilation, not as a validation check, or consider removing it from the "Enforcement Areas" list to accurately reflect what validateStrictMode() actually validates.
| 5. **Action Pinning**: Enforces GitHub Actions to be pinned to specific commit SHAs. | |
| 6. **Deprecated Fields**: Refuses use of deprecated frontmatter fields. | |
| 5. **Deprecated Fields**: Refuses use of deprecated frontmatter fields. | |
| > [!NOTE] | |
| > **Action Pinning:** | |
| > Action pinning (requiring GitHub Actions to be pinned to specific commit SHAs) is always enforced during the compilation process, not as part of strict mode validation. Strict mode may affect action pinning behavior, but the enforcement occurs during compilation, not as a strict mode validation check. |
| 5. **Action Pinning**: Enforces GitHub Actions to be pinned to specific commit SHAs. | ||
|
|
||
| 6. **No Deprecated Fields**: Refuses deprecated frontmatter fields. |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation lists "Action Pinning" as enforcement area #5, but action pinning is not validated in the validateStrictMode() function in strict_mode_validation.go. Instead, strict mode affects action pinning behavior indirectly through GetActionPinWithData() in action_pins.go (lines 121-127), which returns an error when an action cannot be pinned.
This enforcement happens during the compilation/pinning process, not as part of the centralized strict mode validation checks. The documentation should clarify that action pinning enforcement occurs during compilation, not as a validation check, or consider removing it from the "Enforcement Areas" list to accurately reflect what validateStrictMode() actually validates.
| 5. **Action Pinning**: Enforces GitHub Actions to be pinned to specific commit SHAs. | |
| 6. **No Deprecated Fields**: Refuses deprecated frontmatter fields. | |
| 5. **No Deprecated Fields**: Refuses deprecated frontmatter fields. | |
| **Note:** Action pinning (requiring all GitHub Actions to be pinned to specific commit SHAs) is always enforced during the compilation process. In strict mode, any unpinned actions will cause compilation to fail, but this is enforced during compilation/pinning, not as part of strict mode validation checks. |
Strict mode enforcement was documented in the security guide but lacked detailed reference documentation explaining the CLI flag, frontmatter field relationship, and complete constraint list.
Changes
Reference Documentation (
frontmatter.md)*allowed)CLI Documentation (
cli.md)--strictflag section under compile commandSecurity Guide (
security.md)All three files now consistently document the same 6 enforcement areas found in
pkg/workflow/strict_mode_validation.go.Addresses #4177
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:
telemetry.astro.buildnode /home/REDACTED/work/gh-aw/gh-aw/docs/node_modules/.bin/astro build(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.