-
Notifications
You must be signed in to change notification settings - Fork 1
sdk%feat(doc): introduce Zensical-based documentation site, WASM-based demos, GitHub Pages workflow #10
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
Merged
Merged
sdk%feat(doc): introduce Zensical-based documentation site, WASM-based demos, GitHub Pages workflow #10
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
a6241b6
sdk%feat(lint): add markdown linter, fix lints, add doc corrections
kwvg c671bfb
primitives%fix(serde): use no_std-safe rounding in amount deserializer
kwvg 2f95532
sdk%doc: clarify no_std + alloc as the baseline
kwvg c9647d1
sdk%doc(zen): add Zensical scaffold and landing page
kwvg b5b781b
sdk%refac(contrib): hoist shared helpers to top-level contrib
kwvg 0f93de9
sdk%doc(zen): add documentation build pipeline
kwvg 9cb7b88
sdk%doc(zen): add WASM packaging to build pipeline
kwvg c1458a7
sdk%doc(zen): add block and transaction parser WASM crate
kwvg 947f3b1
sdk%ci: adjust lint infra to support multiple workspaces
kwvg ca9df9b
sdk%fix(codeql): consolidate `fileRelPath` into files.qll, fix regex
kwvg 9fda4d6
sdk%feat(lint): adjust ESLint config to include `docs/`
kwvg fe8f183
sdk%doc(zen): wire parser demo into Zensical site
kwvg 784d6a7
sdk%doc(zen): add genesis solver WASM crate
kwvg c2da295
sdk%doc(zen): wire genesis solver into Zensical site
kwvg 4ac7c8b
sdk%doc(zen): add JS minification to build pipeline
kwvg 5663de4
sdk%ci: add GitHub Pages deployment workflow
kwvg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| name: Deploy docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: [develop] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: pages | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build site | ||
| runs-on: ubuntu-24.04-arm | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 1 | ||
| persist-credentials: false | ||
|
|
||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: nightly-2026-02-01 | ||
| targets: wasm32-unknown-unknown | ||
|
|
||
| - name: Install wasm-pack | ||
| run: cargo install wasm-pack@0.15.0 | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version-file: pyproject.toml | ||
|
|
||
| - name: Install Python dependencies | ||
| run: pip install ".[dev]" | ||
|
|
||
| - name: Manage cargo registry | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| key: cargo-deps-${{ hashFiles('Cargo.lock', 'contrib/samples/Cargo.lock') }} | ||
| restore-keys: cargo-deps- | ||
|
|
||
| - name: Build documentation | ||
| run: python contrib/build_docs.py build | ||
|
|
||
| - name: Upload Pages artifact | ||
| uses: actions/upload-pages-artifact@v5 | ||
| with: | ||
| path: public | ||
|
|
||
| deploy: | ||
| name: Deploy to GitHub Pages | ||
| needs: build | ||
| runs-on: ubuntu-24.04-arm | ||
|
|
||
| permissions: | ||
| pages: write | ||
| id-token: write | ||
|
|
||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
|
|
||
| steps: | ||
| - name: Deploy to GitHub Pages | ||
| id: deployment | ||
| uses: actions/deploy-pages@v5 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| """Contributor tooling packages.""" |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: dashpay/base-sdk
Length of output: 90
🏁 Script executed:
Repository: dashpay/base-sdk
Length of output: 2265
🌐 Web query:
GitHub Actions security best practices pin commit SHA persist-credentials💡 Result:
Securing GitHub Actions workflows involves two critical practices: pinning actions to commit SHAs to ensure immutability [1][2] and explicitly managing credential persistence to prevent unauthorized access [3][4]. Pinning Actions to Commit SHAs Pinning an action to a full-length commit SHA is the only way to ensure the action is an immutable release [1]. Unlike tags or branches, which are mutable and can be updated or redirected by a malicious actor to compromise your workflow [2][5], a commit SHA is immutable once a commit exists [2]. - Implementation: Reference the full-length SHA in your workflow file. It is recommended to include the version tag as a comment for readability [6][5]. - uses: actions/checkout@3df4ab1 # v4.0.0 - Governance: GitHub supports organization-level policies that enforce SHA pinning for all actions [7][2]. If enabled, any workflow using a tag or branch will fail [2][6]. - Automation: Use tools like Dependabot or Renovate (specifically the
helpers:pinGitHubActionDigestspreset) to automate updates to your pinned SHAs, ensuring you benefit from security patches without sacrificing immutability [2][6]. Managing Credential Persistence Theactions/checkoutaction defaults topersist-credentials: true, which stores theGITHUB_TOKEN(or other credentials) in the runner's local Git configuration [8][3]. This exposes the token to every subsequent step in the job, increasing the risk of credential leakage if a malicious action or script is executed [3][4][9]. - Implementation: Explicitly setpersist-credentials: falsein your checkout steps unless your workflow specifically requires pushing commits back to the repository [3][4]. - uses: actions/checkout@v4 with: persist-credentials: false - Security Rationale: Setting this tofalseprevents the token from being persisted in the Git configuration file, thereby limiting the risk of it being accessed by third-party actions, logged, or accidentally included in build artifacts [3][10]. If your workflow must push changes, use a scopedGITHUB_TOKENwith the minimum required permissions [3][11]. Additional Best Practices - Principle of Least Privilege: Always set the defaultpermissionsfor theGITHUB_TOKENto read-only at the workflow or job level and grant specific write access only when necessary [12][11]. - Automated Auditing: Use tools like Zizmor or similar linters to audit your workflows for missing SHA pins and unsafe credential configurations [6][3][10].Citations:
Pin third-party GitHub Actions to immutable commit SHAs and disable credential persistence.
Lines 22, 27, 36, 44, 56, and 76 use mutable version tags (
@v*/@master), which creates supply-chain vulnerabilities. Pin each action to its full commit SHA instead. Additionally, addpersist-credentials: falseto the checkout step (lines 21-24) since this workflow performs no git push or authentication operations.Suggested hardening diff
- name: Checkout uses: actions/checkout@v6 + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: fetch-depth: 1 + persist-credentials: false - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@<pinned-commit-sha> - name: Set up Python - uses: actions/setup-python@v6 + uses: actions/setup-python@<pinned-commit-sha> - name: Manage cargo registry - uses: actions/cache@v5 + uses: actions/cache@<pinned-commit-sha> - name: Upload Pages artifact - uses: actions/upload-pages-artifact@v5 + uses: actions/upload-pages-artifact@<pinned-commit-sha> - name: Deploy to GitHub Pages - uses: actions/deploy-pages@v5 + uses: actions/deploy-pages@<pinned-commit-sha>📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 21-24: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 22-22: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Source: Linters/SAST tools