-
Notifications
You must be signed in to change notification settings - Fork 33
docs: adding the workflow yaml and the default from docs-template. #2064
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
base: master
Are you sure you want to change the base?
Conversation
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.
Hey there - I've reviewed your changes and they look great!
Blocking issues:
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `.github/workflows/publish-docs.yml:14` </location>
<code_context>
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: SciCatProject/docs-template/.github/actions/mkdocs-pages@main
+ with:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Consider pinning the action to a specific commit or tag for reproducibility.
Referencing '@main' may introduce breaking changes if the upstream branch changes. Pinning to a commit or tag ensures stable and predictable builds.
Suggested implementation:
```
- uses: SciCatProject/docs-template/.github/actions/mkdocs-pages@c7e2f3a2b7e8a1d2f4b5c6e7f8a9b0c1d2e3f4a5
```
Replace `c7e2f3a2b7e8a1d2f4b5c6e7f8a9b0c1d2e3f4a5` with the actual commit SHA or tag you want to pin to. You can find the latest stable commit or tag in the SciCatProject/docs-template repository.
</issue_to_address>
### Comment 2
<location> `.github/workflows/publish-docs.yml:14` </location>
<code_context>
- uses: SciCatProject/docs-template/.github/actions/mkdocs-pages@main
</code_context>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: SciCatProject/docs-template/.github/actions/mkdocs-pages@main |
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.
suggestion (bug_risk): Consider pinning the action to a specific commit or tag for reproducibility.
Referencing '@main' may introduce breaking changes if the upstream branch changes. Pinning to a commit or tag ensures stable and predictable builds.
Suggested implementation:
- uses: SciCatProject/docs-template/.github/actions/mkdocs-pages@c7e2f3a2b7e8a1d2f4b5c6e7f8a9b0c1d2e3f4a5
Replace c7e2f3a2b7e8a1d2f4b5c6e7f8a9b0c1d2e3f4a5
with the actual commit SHA or tag you want to pin to. You can find the latest stable commit or tag in the SciCatProject/docs-template repository.
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: SciCatProject/docs-template/.github/actions/mkdocs-pages@main |
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.
security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha): An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
Source: opengrep
Description
Adding a documentation workflow to the frontend repository based on the
docs-template
repository . This provides unified styling for all documentation across the SciCat project space.Motivation
We want to put documentation next to the microservices , instead of having a single documentation repository which is hard to maintain. We want the styling and CI of the docs to be consistent across the SciCat Project.
Changes:
mkdocs.yml
to.github/mkdocs
pathpublish-docs.yml
workflowSummary by Sourcery
Set up documentation deployment via GitHub Actions and provide a default mkdocs configuration for unified styling.
CI:
Documentation: