-
Notifications
You must be signed in to change notification settings - Fork 3
test: Add GitHub Pages docs deployment #49
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,38 @@ | ||||||||
| name: Deploy Docs to GitHub Pages | ||||||||
|
|
||||||||
| on: | ||||||||
| push: | ||||||||
| branches: | ||||||||
| - docs # Deploy when pushing to docs branch | ||||||||
| workflow_dispatch: # Allow manual trigger | ||||||||
|
|
||||||||
| permissions: | ||||||||
| contents: read | ||||||||
| pages: write | ||||||||
| id-token: write | ||||||||
|
|
||||||||
| concurrency: | ||||||||
| group: "pages" | ||||||||
| cancel-in-progress: false | ||||||||
|
|
||||||||
| jobs: | ||||||||
| deploy: | ||||||||
| environment: | ||||||||
| name: github-pages | ||||||||
| url: ${{ steps.deployment.outputs.page_url }} | ||||||||
| runs-on: ubuntu-latest | ||||||||
| steps: | ||||||||
| - name: Checkout | ||||||||
| uses: actions/checkout@v4 | ||||||||
|
|
||||||||
| - name: Setup Pages | ||||||||
| uses: actions/configure-pages@v5 | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Semgrep identified an issue in your code: GitHub Actions step uses mutable version tag More details about thisThe How an attacker could exploit this:
This attack pattern has happened before—notably with To resolve this comment: ✨ Commit fix suggestion
Suggested change
View step-by-step instructions
Pinning to a full commit SHA prevents unexpected changes to workflows if the tag is repointed in the future, reducing your risk of supply-chain attacks. 💬 Ignore this findingReply with Semgrep commands to ignore this finding.
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag. Need help with this issue? Consult our Semgrep Findings Documentation or ask in #help-appsec on Slack. You can view more details about this finding in the Semgrep AppSec Platform. |
||||||||
|
|
||||||||
| - name: Upload artifact | ||||||||
| uses: actions/upload-pages-artifact@v3 | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Semgrep identified an issue in your code: GitHub Actions step uses mutable tag More details about thisThe GitHub Actions workflow uses Here's how an attacker could exploit this:
The To resolve this comment: ✨ Commit fix suggestion
Suggested change
View step-by-step instructions
💬 Ignore this findingReply with Semgrep commands to ignore this finding.
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag. Need help with this issue? Consult our Semgrep Findings Documentation or ask in #help-appsec on Slack. You can view more details about this finding in the Semgrep AppSec Platform. |
||||||||
| with: | ||||||||
| path: 'docs' | ||||||||
|
|
||||||||
| - name: Deploy to GitHub Pages | ||||||||
| id: deployment | ||||||||
| uses: actions/deploy-pages@v4 | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Semgrep identified an issue in your code: Mutable version tag More details about thisThe step Exploit Scenario:
This is the same attack vector that enabled the trivy-action and kics-github-action compromises. Using a pinned commit SHA ensures you always run the exact version you tested and approved, preventing silent malicious updates. To resolve this comment: ✨ Commit fix suggestion
Suggested change
View step-by-step instructions
💬 Ignore this findingReply with Semgrep commands to ignore this finding.
Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag. Need help with this issue? Consult our Semgrep Findings Documentation or ask in #help-appsec on Slack. You can view more details about this finding in the Semgrep AppSec Platform. |
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| theme: jekyll-theme-cayman | ||
| title: Twilio Agent Connect Python SDK | ||
| description: Official Python SDK for Twilio Agent Connect | ||
|
|
||
| markdown: kramdown |
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.
Semgrep identified an issue in your code:
GitHub Actions step uses mutable version tag
@v4instead of pinned commit SHA, allowing attackers to silently redirect the action to malicious code.More details about this
The
actions/checkoutstep uses version tag@v4instead of a pinned commit SHA. Version tags and branch references in GitHub Actions can be silently repointed by the action's owner to malicious code without any update to your workflow file. This enables supply-chain attacks where a compromised maintainer could redirect@v4to inject malicious code that exfiltrates repository secrets or modifies your build output.Exploit scenario:
actions/checkoutrepository and force-pushes thev4tag to point to a commit containing malicious codeGITHUB_TOKEN, allowing the attacker to read your repository secrets or push backdoors to your main branchPin to a full 40-character commit SHA (e.g.,
actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608) to ensure you always run the exact version you tested.To resolve this comment:
✨ Commit fix suggestion
View step-by-step instructions
uses: actions/checkout@v4withuses: actions/checkout@<commit-sha>where<commit-sha>is the full 40-character commit hash you found in step 1 (for example:uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608).v4,v3,main, or similar).Pinning to a full commit SHA ensures the workflow always uses the same, reviewed code and protects against supply-chain attacks resulting from upstream changes.
💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasonsAlternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.
Need help with this issue? Consult our Semgrep Findings Documentation or ask in #help-appsec on Slack.
You can view more details about this finding in the Semgrep AppSec Platform.