Skip to content

feat: release workflow, footer license link, security hardening (v1.5.0) - #11

Merged
NX1X merged 4 commits into
mainfrom
feat/release-workflow-footer
Jul 25, 2026
Merged

feat: release workflow, footer license link, security hardening (v1.5.0)#11
NX1X merged 4 commits into
mainfrom
feat/release-workflow-footer

Conversation

@NX1X

@NX1X NX1X commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

Two changes bundled for the 1.5.0 release:

Release workflow + footer (39149c9)

  • .github/workflows/release.yml: pushing a v* tag (or manual dispatch) creates the GitHub Release with the matching CHANGELOG section as notes
  • Footer now shows a GitHub logo linking to the repository and an Apache License 2.0 notice (bilingual)

Security hardening, bump to 1.5.0 (154bfa8)

Follow-ups from a full security review of the v1.4.0 extraction rework:

  • DoS hardening: column-detection histogram rebuilt on a difference array, O(items + size) instead of O(rows x size); fragment merging skips rows with more than 400 fragments. A crafted PDF now degrades gracefully instead of freezing the tab (adversarial 20k-row benchmark: ~4s to 3ms, output verified byte-identical across 200 fuzz trials)
  • Excel export: formula-leading cells get the Text number format, so in-place edits in Excel cannot silently convert them into live formulas; cell text stays unmangled
  • CI SRI gate: check-cdn-versions.sh now fails on missing, invalid, or mismatched integrity attributes in index.html, not just version drift (previously a stripped SRI hash passed CI)
  • Renovate: cdnjs manager regex now matches the single-quoted URLs in app.js/sw.js (previously invisible to Renovate, so automated updates would have left the worker and SW cache list stale); GitHub Actions digest updates no longer auto-merge and require dashboard approval

Version bumped to 1.5.0 in package.json, README badge, and the service-worker cache name; CHANGELOG has the full 1.5.0 entry.

Test plan

  • bash scripts/check-cdn-versions.sh passes; fails correctly on stripped-SRI and tampered-digest fixtures
  • bash scripts/check-action-pins.sh passes
  • node --check public/app.js; histogram fuzz-tested for equivalence with the old algorithm
  • renovate.json regex verified against all 3 files (8/8 cdnjs references parsed)
  • CI green on this PR

Summary by CodeRabbit

  • New Features

    • Added automated release creation from version tags, including matching changelog notes.
    • Added GitHub and Apache License 2.0 links to the footer.
    • Improved PDF table extraction performance and Excel handling of formula-like text.
    • Added stronger CDN integrity and security validation in CI.
  • Bug Fixes

    • Fixed updates for single-quoted cdnjs references.
    • Updated caching for version 1.5.0.
  • Documentation

    • Updated the version to 1.5.0 and expanded release notes.

Update

The Egret CI integration was removed from this PR: GitHub-hosted runners trip a false positive on the Azure wireserver IP 168.63.129.16 (raw-ip egress from the runner's waagent). Bug filed upstream as NX1X/Egret#10; the integration returns once that lands.

NX1X added 2 commits July 25, 2026 11:23
- .github/workflows/release.yml: on v* tag push or manual dispatch,
  creates the GitHub Release using the matching CHANGELOG.md section
  as notes. SHA-pinned checkout, contents:read default with
  contents:write on the release job only, tag input validated
- scripts/release.sh reworked for the PR-based flow: validates main is
  clean and in sync, requires a CHANGELOG section for the current
  package.json version, then tags and pushes; the workflow creates the
  Release (old script pushed to main directly, double-wrote the
  changelog, and linked a stale repo URL)
- Footer: GitHub logo icon linking to the repository and a bilingual
  Apache License 2.0 notice
…mp to 1.5.0

- Column-detection histogram built from a difference array (O(items + size)
  instead of O(rows x size)); fragment merging skips rows with more than
  400 fragments, so crafted PDFs degrade gracefully instead of freezing
- Excel exports mark formula-leading cells with the Text number format so
  in-place edits in Excel cannot convert them into live formulas
- check-cdn-versions.sh also fails on missing, invalid, or mismatched SRI
  integrity attributes in index.html, not just version drift
- Renovate: cdnjs manager regex now matches the single-quoted URLs in
  app.js and sw.js; GitHub Actions digest updates no longer auto-merge
  and require dashboard approval
- CI guard scripts run under the Egret security action (audit mode,
  zero-egress policy, SARIF upload)
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Version 1.5.0 updates add Egret-enforced CI security checks, stronger CDN/SRI validation, PDF and Excel processing changes, tag-driven release automation, footer attribution and localization, cache versioning, and release metadata updates.

Changes

Release, security, and application updates

Layer / File(s) Summary
Processing and CDN validation
public/app.js, scripts/check-cdn-versions.sh, .github/renovate.json
PDF fragment and column processing, Excel formula text formatting, CDN SRI checks, and cdnjs matching are updated.
Egret security enforcement
.github/egret-policy.yaml, .github/workflows/ci.yml, .github/renovate.json
CI uses a zero-egress Egret audit policy for CDN and action checks, while GitHub Actions digest repoints require dashboard approval.
Tag-driven release automation
.github/workflows/release.yml, scripts/release.sh, package.json, README.md, CHANGELOG.md, public/sw.js
Release tags are validated, matching changelog sections become GitHub Release notes, the release script pushes annotated tags only, and version/cache metadata moves to 1.5.0.
Footer attribution and localization
public/index.html, public/style.css, public/app.js
The footer gains a GitHub icon and Apache License 2.0 link with localized license text and styling.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Maintainer
  participant ReleaseScript as scripts/release.sh
  participant GitHubActions as release.yml
  participant Changelog as CHANGELOG.md
  participant GitHubRelease as GitHub Release
  Maintainer->>ReleaseScript: Confirm annotated v<version> tag
  ReleaseScript->>GitHubActions: Push release tag
  GitHubActions->>Changelog: Extract matching version section
  GitHubActions->>GitHubRelease: Create release with extracted notes
Loading

Possibly related PRs

  • NX1X/EasyConvert#9: Both PRs modify PDF table/text extraction and column boundary detection in public/app.js.

Poem

I’m a bunny with a tagged release,
Hopping through checks for safer peace.
SRI carrots sparkle, formulas stay tame,
GitHub ears adorn the footer frame.
One neat changelog, and off we leap! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main changes: release workflow, footer license link, and security hardening for v1.5.0.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread .github/egret-policy.yaml Outdated
@@ -0,0 +1,23 @@
# Egret runtime security policy for CI (https://github.com/NX1X/Egret)
Comment thread .github/egret-policy.yaml Outdated
@@ -0,0 +1,23 @@
# Egret runtime security policy for CI (https://github.com/NX1X/Egret)
Comment thread .github/egret-policy.yaml Outdated
@@ -0,0 +1,23 @@
# Egret runtime security policy for CI (https://github.com/NX1X/Egret)
Comment thread .github/egret-policy.yaml Outdated
@@ -0,0 +1,23 @@
# Egret runtime security policy for CI (https://github.com/NX1X/Egret)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 37-40: Update the “Checkout tag” actions/checkout step to set
persist-credentials to false, while preserving its existing tag ref and other
configuration; the later gh release create authentication must continue using
GH_TOKEN.

In `@scripts/check-cdn-versions.sh`:
- Around line 40-51: Update the CDN validation loop in
scripts/check-cdn-versions.sh to extract each complete cdnjs <script> or <link>
element, including multiline elements, instead of validating source lines. Apply
the integrity and crossorigin checks independently to every extracted element so
attributes from one tag cannot satisfy another, while preserving the existing
failure messages and status handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c59de41-34c1-4949-adc1-56c803d00d6c

📥 Commits

Reviewing files that changed from the base of the PR and between 611fb9c and 154bfa8.

📒 Files selected for processing (13)
  • .github/egret-policy.yaml
  • .github/renovate.json
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • CHANGELOG.md
  • README.md
  • package.json
  • public/app.js
  • public/index.html
  • public/style.css
  • public/sw.js
  • scripts/check-cdn-versions.sh
  • scripts/release.sh

Comment on lines +37 to +40
- name: Checkout tag
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ steps.tag.outputs.tag }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Set persist-credentials: false on the checkout step.

This step only reads CHANGELOG.md; the later gh release create call authenticates via its own GH_TOKEN env var, not the git-persisted credential. Per zizmor's artipacked audit, checkout should default to persist-credentials: false unless git operations are needed.

🔒 Proposed fix
       - name: Checkout tag
         uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
         with:
           ref: ${{ steps.tag.outputs.tag }}
+          persist-credentials: false
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Checkout tag
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ steps.tag.outputs.tag }}
- name: Checkout tag
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ steps.tag.outputs.tag }}
persist-credentials: false
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 37-40: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 37 - 40, Update the “Checkout
tag” actions/checkout step to set persist-credentials to false, while preserving
its existing tag ref and other configuration; the later gh release create
authentication must continue using GH_TOKEN.

Source: Linters/SAST tools

Comment on lines +40 to +51
while IFS= read -r line; do
n="${line%%:*}"
tag="${line#*:}"
if ! printf '%s' "$tag" | grep -qE 'integrity="sha(384|512)-[A-Za-z0-9+/=]+"'; then
echo "MISSING SRI: ${html}:${n} cdnjs reference has no valid integrity attribute"
fail=1
fi
if ! printf '%s' "$tag" | grep -q 'crossorigin="anonymous"'; then
echo "MISSING crossorigin: ${html}:${n} cdnjs reference lacks crossorigin=\"anonymous\""
fail=1
fi
done < <(grep -n 'cdnjs\.cloudflare\.com' "$html")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Validate individual HTML elements, not source lines.

A line with multiple CDN tags can pass when only one has SRI/crossorigin; multiline tags can fail despite valid attributes. Extract and validate each complete <script>/<link> element before checking attributes and digests.

Also applies to: 60-61

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/check-cdn-versions.sh` around lines 40 - 51, Update the CDN
validation loop in scripts/check-cdn-versions.sh to extract each complete cdnjs
<script> or <link> element, including multiline elements, instead of validating
source lines. Apply the integrity and crossorigin checks independently to every
extracted element so attributes from one tag cannot satisfy another, while
preserving the existing failure messages and status handling.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 25, 2026

Copy link
Copy Markdown

Deploying easyconvert-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: bf2654f
Status: ✅  Deploy successful!
Preview URL: https://dc2823cd.easyconvert-website.pages.dev
Branch Preview URL: https://feat-release-workflow-footer.easyconvert-website.pages.dev

View logs

@NX1X
NX1X enabled auto-merge (squash) July 25, 2026 10:38
The Azure wireserver false positive (168.63.129.16 raw-ip egress from
the runner's waagent) needs a fix in Egret itself (NX1X/Egret#10);
re-add the action once that lands.
@NX1X
NX1X merged commit a909ac5 into main Jul 25, 2026
10 checks passed
@NX1X
NX1X deleted the feat/release-workflow-footer branch July 25, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants