Skip to content

Commit a4f07f2

Browse files
committed
fix review findings: shell injection, POSIX grep, .md coverage, CI wording
- Use env var instead of expression interpolation for changed-files input in composite action (shell injection risk) - Replace \s with POSIX [[:space:]] in grep pattern (portability) - Include .md files in draft detection (draft-check.yml and composite action) - Fix CI section in blog post: v1.9 shows deprecation warning, v1.10 does the transparent redirect
1 parent a4815fe commit a4f07f2

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/actions/detect-drafts/action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'Detect Draft Pages'
2-
description: 'Scan changed .qmd files for draft: true in YAML frontmatter'
2+
description: 'Scan changed .qmd and .md files for draft: true in YAML frontmatter'
33
inputs:
44
changed-files:
55
description: 'JSON array of changed file paths (from tj-actions/changed-files)'
@@ -15,11 +15,12 @@ runs:
1515
using: composite
1616
steps:
1717
- id: detect
18+
env:
19+
CHANGED_FILES: ${{ inputs.changed-files }}
1820
run: |
19-
CHANGED='${{ inputs.changed-files }}'
20-
DRAFTS=$(echo "$CHANGED" | jq -r '.[]' | while read -r file; do
21-
if [[ "$file" == *.qmd ]] && [ -f "$file" ]; then
22-
if sed -n '/^---$/,/^---$/p' "$file" | grep -qE '^\s*draft:\s*true\s*$'; then
21+
DRAFTS=$(echo "$CHANGED_FILES" | jq -r '.[]' | while read -r file; do
22+
if [[ "$file" == *.qmd || "$file" == *.md ]] && [ -f "$file" ]; then
23+
if sed -n '/^---$/,/^---$/p' "$file" | grep -qE '^[[:space:]]*draft:[[:space:]]*true[[:space:]]*$'; then
2324
echo "$file"
2425
fi
2526
fi

.github/workflows/draft-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
with:
1818
files: |
1919
docs/**/*.qmd
20+
docs/**/*.md
2021
json: true
2122
escape_json: false
2223

docs/blog/posts/2026-04-13-chrome-headless-shell/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Running `quarto check install` will warn you if a legacy Chromium installation i
5151

5252
### CI and automation
5353

54-
If your CI pipeline uses `quarto install chromium --no-prompt`, it will continue to work — the command transparently redirects to Chrome Headless Shell. No changes are required, but updating your scripts to use `quarto install chrome-headless-shell --no-prompt` makes the intent clearer and avoids the deprecation warning.
54+
If your CI pipeline uses `quarto install chromium --no-prompt`, it will continue to work — the command still installs a working headless browser, but now shows a deprecation warning. Updating your scripts to `quarto install chrome-headless-shell --no-prompt` avoids the warning and uses the new tool directly. In Quarto 1.10, `quarto install chromium` will transparently redirect to Chrome Headless Shell, so either command will produce the same result.
5555

5656
## What's next
5757

0 commit comments

Comments
 (0)