Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Deploy index.html demo to GitHub Pages
name: Deploy Demo to GitHub Pages

on:
push:
branches: [main]
workflow_dispatch:

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

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Comment on lines +26 to +38
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Pin GitHub Actions to commit SHAs for supply-chain hardening.

At Line [28], Line [31], Line [34], and Line [40], version tags are mutable. Prefer SHA pinning to prevent unexpected action drift.

Use this check to find non-SHA-pinned actions across workflows (expected: no output after remediation):

#!/bin/bash
set -euo pipefail

rg -n --glob '.github/workflows/*.yml' --glob '.github/workflows/*.yaml' '^\s*uses:\s*[^@]+@[^[:space:]]+' \
| awk -F'@' '
{
  ref=$2
  if (ref !~ /^[0-9a-fA-F]{40}$/) print $0
}'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy-pages.yml around lines 28 - 40, Replace the four
mutable action refs (actions/checkout@v4, actions/configure-pages@v5,
actions/upload-pages-artifact@v3, actions/deploy-pages@v4) with their
corresponding immutable commit SHAs; locate each `uses:` line in the workflow
and update the ref after `@` to the exact 40-character commit SHA from the
action's repository (e.g., the latest stable commit for each action) so the
workflow pins to specific commits rather than version tags.

11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<!-- Organization Name -->
<div align="center">

[![Static Badge](https://img.shields.io/badge/AOSSIE-Social_Share_Button-228B22?style=for-the-badge&labelColor=FFC517)](https://TODO.aossie/)
[![Static Badge](https://img.shields.io/badge/AOSSIE-Social_Share_Button-228B22?style=for-the-badge&labelColor=FFC517)](https://aossie-org.github.io/SocialShareButton/)

<!-- Correct deployed url to be added -->
[![Live Demo](https://img.shields.io/badge/🚀_Live_Demo-Click_Here-blue?style=for-the-badge)](https://aossie-org.github.io/SocialShareButton/)

</div>

Expand Down Expand Up @@ -655,8 +655,11 @@ new SocialShareButton({

## Demo

Open `index.html` in your browser to see all features.
Tutorial: https://youtu.be/cLJaT-8rEvQ?si=CLipA0Db4WL0EqKM
🚀 **[Live Demo](https://aossie-org.github.io/SocialShareButton/)** - Try it now without cloning!

Or open `index.html` locally in your browser to see all features.

📺 Tutorial: https://youtu.be/cLJaT-8rEvQ?si=CLipA0Db4WL0EqKM

---

Expand Down