Repository navigation
chore: update rhiza to v1.6.0 #314
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
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 |
|---|---|---|
|
|
@@ -4,15 +4,18 @@ | |
| # Workflow: Paper | ||
| # | ||
| # Purpose: Compile the LaTeX paper (docs/paper/*.tex) to a PDF and publish it | ||
| # as a downloadable workflow artifact. The durable copy is published by | ||
| # the book: `paper` is a prerequisite of `book`, and docs/paper/ sits | ||
| # inside the docs tree, so the PDF ships as a site asset. | ||
| # three ways: as a downloadable workflow artifact, as a site asset | ||
| # through the book (the paper folder sits inside the docs tree), and on | ||
| # the dedicated `paper` branch, which holds the PDF and nothing else. | ||
| # | ||
| # It no longer pushes to an orphan `paper` branch (rhiza #1494): that | ||
| # ref cannot coexist with any `paper/<topic>` branch, so the push failed | ||
| # in exactly the repositories most likely to have one. A repository that | ||
| # still has the branch gets a warning naming it; delete it when nothing | ||
| # links to it. | ||
| # The compile is the `paper` task from the pinned rhiza-task CLI -- the | ||
| # same one `make paper` runs locally -- so the engine and the choice of | ||
| # root document are defined once, not restated per platform. | ||
| # | ||
| # One caveat on the branch: git refs are paths, so `refs/heads/paper` | ||
| # cannot coexist with a `paper/<topic>` branch. The workflow checks for | ||
| # one and fails with a message naming it rather than with a bare push | ||
| # error; rename the topic branch if you hit that. | ||
| # | ||
| # Trigger: On push/PR to main/master when docs/paper/** changes, or manual dispatch. | ||
|
|
||
|
|
@@ -36,9 +39,9 @@ on: | |
|
|
||
| jobs: | ||
| paper: | ||
| uses: jebel-quant/rhiza/.github/workflows/rhiza_paper.yml@v1.5.2 | ||
| uses: jebel-quant/rhiza/.github/workflows/rhiza_paper.yml@v1.6.0 | ||
| secrets: inherit | ||
| # `contents: read` only. The `write` scope this stub used to grant existed solely for | ||
| # the retired branch push; compiling and uploading an artifact need no write access. | ||
| # `contents: write` is for the `paper` branch publish and nothing else. A pull request | ||
| # never reaches that step, so the scope is unused on every PR run. | ||
| permissions: | ||
| contents: read | ||
| contents: write | ||
|
Contributor
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. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: sed -n '1,100p' .github/workflows/rhiza_paper.yml
printf '\n--- workflow references ---\n'
rg -n --hidden -S 'jebel-quant/rhiza|rhiza_paper|contents:\s*write|pull_request|branches:' .githubRepository: tschm/jsharpe Length of output: 6482 🌐 Web query:
💡 Result: The reference jebel-quant/rhiza.github/workflows/rhiza_paper.yml v1.6.0 does not describe a specific version of the Rhiza repository itself [1][2]. Instead, v1.6.0 refers to a version of an external pre-commit hook (betterleaks/betterleaks) that is managed within the Rhiza project's dependency configurations [3][4]. Rhiza is a collection of reusable configuration templates for Python projects [1][5]. The file.github/workflows/rhiza_paper.yml is a workflow within the Rhiza repository designed to compile LaTeX papers and publish them as PDF artifacts [5][6][7]. While Rhiza workflows are versioned via the tags used in downstream project references (e.g., using jebel-quant/rhiza/.github/workflows/rhiza_paper.yml@v0.19.9), the string v1.6.0 is not a version identifier for the Rhiza repository or its workflows [8][4]. The version v1.6.0 specifically appeared in the context of a dependency update for the betterleaks pre-commit hook within the Rhiza project [3][4]. Citations:
🏁 Script executed: python3 - <<'PY'
import json, urllib.request
url = "https://api.github.com/repos/jebel-quant/rhiza/contents/.github/workflows/rhiza_paper.yml?ref=v1.6.0"
req = urllib.request.Request(url, headers={"Accept": "application/vnd.github+json", "User-Agent": "review-check"})
try:
with urllib.request.urlopen(req) as response:
data = json.load(response)
print(data.get("download_url"))
content = data.get("content")
if content:
import base64
print(base64.b64decode(content).decode())
except Exception as exc:
print(type(exc).__name__, exc)
PYRepository: tschm/jsharpe Length of output: 295 🏁 Script executed: set -eu
repo='jebel-quant/rhiza'
tag='v1.6.0'
api="https://api.github.com/repos/$repo"
json="$(curl -ksSfL -H 'Accept: application/vnd.github+json' -A 'review-check' "$api/git/ref/tags/$tag")"
printf '%s\n' "$json" | jq '{ref, object}'
type="$(printf '%s\n' "$json" | jq -r '.object.type')"
sha="$(printf '%s\n' "$json" | jq -r '.object.sha')"
if [ "$type" = tag ]; then
tag_json="$(curl -ksSfL -H 'Accept: application/vnd.github+json' -A 'review-check' "$api/git/tags/$sha")"
printf '%s\n' "$tag_json" | jq '{tag, object}'
sha="$(printf '%s\n' "$tag_json" | jq -r '.object.sha')"
fi
printf '\nresolved commit:\n'
curl -ksSfL -H 'Accept: application/vnd.github+json' -A 'review-check' "$api/commits/$sha" | jq -r '.sha'
printf '\nworkflow at resolved commit:\n'
curl -ksSfL -A 'review-check' "https://raw.githubusercontent.com/$repo/$sha/.github/workflows/rhiza_paper.yml" | nl -ba | sed -n '1,240p'Repository: tschm/jsharpe Length of output: 843 🏁 Script executed: set -eu
repo='Jebel-Quant/rhiza'
sha='e556617285b215566e563c58022c3a031e870aad'
curl -ksSfL -A 'review-check' \
"https://raw.githubusercontent.com/$repo/$sha/.github/workflows/rhiza_paper.yml" |
awk '{printf "%4d %s\n", NR, $0}' | sed -n '1,260p'Repository: tschm/jsharpe Length of output: 15459 🏁 Script executed: python3 - <<'PY'
import json, urllib.request, ssl
ctx = ssl._create_unverified_context()
def get(url):
req = urllib.request.Request(url, headers={"Accept": "application/vnd.github+json", "User-Agent": "review-check"})
with urllib.request.urlopen(req, context=ctx) as r:
return json.load(r)
repo = get("https://api.github.com/repos/tschm/jsharpe")
print("default_branch:", repo["default_branch"])
caller = open(".github/workflows/rhiza_paper.yml", encoding="utf-8").read()
remote_url = "https://raw.githubusercontent.com/Jebel-Quant/rhiza/e556617285b215566e563c58022c3a031e870aad/.github/workflows/rhiza_paper.yml"
req = urllib.request.Request(remote_url, headers={"User-Agent": "review-check"})
with urllib.request.urlopen(req, context=ctx) as r:
remote = r.read().decode()
print("\ncaller trigger/publish permission facts:")
for line in caller.splitlines():
if any(token in line for token in ("push:", "pull_request:", "workflow_dispatch:", "branches:", "uses:", "permissions:", "contents: write")):
print(line)
print("\npinned workflow write-related facts:")
for i, line in enumerate(remote.splitlines(), 1):
if "contents: write" in line or "github.event_name" in line or "git push" in line or "Publish the PDF" in line:
print(f"{i}: {line}")
PYRepository: tschm/jsharpe Length of output: 963 Restrict publication to default-branch pushes. The pinned workflow skips publication only for 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| repository: "jebel-quant/rhiza" | ||
| ref: "v1.5.2" | ||
| ref: "v1.6.0" | ||
|
|
||
| profiles: | ||
| - github-project | ||
|
|
||
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.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: tschm/jsharpe
Length of output: 8636
🌐 Web query:
jebel-quant/rhiza v1.6.0 reusable workflows workflow_call secrets rhiza_benchmark rhiza_book rhiza_ci rhiza_codeql rhiza_marimo rhiza_scorecard rhiza_weekly rhiza_paper💡 Result:
Jebel-Quant/rhiza is a repository providing living project templates [1] that allow developers to continuously synchronize configuration files, CI/CD workflows, and tooling [1]. The workflows you mentioned—rhiza_benchmark, rhiza_book, rhiza_ci, rhiza_codeql, rhiza_marimo, rhiza_scorecard, and rhiza_weekly—are core GitHub Actions workflows provided by the Rhiza template to maintain project health and automation [2][3]. These workflows are configured to support workflow_call [4], enabling them to be triggered from other repositories or workflows. As part of this configuration, they often require specific secrets to be passed for authentication and access to external resources [5][4]. Common secrets utilized by these workflows include: - GH_PAT: Frequently required for GitHub API authentication, especially when workflows need to interact with private repositories or perform administrative tasks [5]. - UV_EXTRA_INDEX_URL: Used to provide credentials or custom index URLs for packages managed by the uv package manager [4]. The rhiza_book workflow, for example, uses workflow_call to enable documentation building across different branches and uses secrets like GH_PAT and UV_EXTRA_INDEX_URL to configure git authentication and manage private package dependencies during the build process [4]. For specific implementation details regarding version v1.6.0 or the exact requirements for a particular workflow, you should consult the workflow YAML files located in the.github/workflows directory of the Jebel-Quant/rhiza repository [4]. These files explicitly define the workflow_call inputs, secrets, and environment requirements needed for proper execution [4].
Citations:
🏁 Script executed:
Repository: tschm/jsharpe
Length of output: 28832
🏁 Script executed:
Repository: tschm/jsharpe
Length of output: 2438
🌐 Web query:
GitHub Actions reusable workflows secrets inherit explicit mapping declared secrets workflow_call documentation💡 Result:
In GitHub Actions, reusable workflows do not automatically receive secrets from the caller; they must be explicitly passed or inherited [1][2][3]. You have two primary methods to provide secrets to a reusable workflow using the workflow_call trigger: 1. Explicit Mapping: You map specific secrets from the caller to the expected secrets in the reusable workflow [4][5][3]. - In the reusable workflow, you must declare the expected secrets in the on.workflow_call.secrets block [2][3]. - In the calling workflow, you provide these secrets using the secrets keyword within the job definition [6][3]. - Example (Caller): jobs: call-workflow: uses:./.github/workflows/reusable.yml secrets: API_KEY: ${{ secrets.MY_SECRET }} 2. Inherit All: You can use secrets: inherit to implicitly pass all secrets accessible to the calling workflow (including organization, repository, and environment secrets) to the called workflow [1][6][7]. - Example (Caller): jobs: call-workflow: uses:./.github/workflows/reusable.yml secrets: inherit Key Considerations: - Security and Principle of Least Privilege: Explicit mapping is generally considered best practice [5][8]. It ensures the reusable workflow only receives the specific credentials it requires, minimizing the potential impact if the workflow is compromised [4][8]. - Inheritance Limitations: secrets: inherit passes all accessible secrets, which may violate security policies or expose unnecessary credentials to less-trusted or external workflows [4][5][8]. - Nesting: Secret forwarding is not transitive [1][6]. In a chain of workflows (e.g., A -> B -> C), workflow C will only receive secrets if they are passed from A to B, and then from B to C [1][6]. - Environment Secrets: Reusable workflows do not support the environment keyword directly under on.workflow_call [1]. If a reusable workflow job references an environment, it will use that environment's secrets, not the secrets passed from the caller [1]. Attempting to access environment secrets from the caller without proper inheritance or passing can result in empty values [7].
Citations:
🏁 Script executed:
Repository: tschm/jsharpe
Length of output: 742
Restrict secrets passed to the v1.6.0 reusable workflows.
rhiza_benchmark.yml,rhiza_ci.yml, andrhiza_weekly.yml, map onlyGH_PATandUV_EXTRA_INDEX_URL.rhiza_scorecard.ymlandrhiza_paper.yml, removesecrets: inherit; these workflows consume no caller secrets.rhiza_book.yml,rhiza_codeql.yml, andrhiza_marimo.yml, declare the consumed secrets in the reusable workflow contract, then map only those secrets here. Do not pass all caller secrets.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 23-23: secrets unconditionally inherited by called workflow (secrets-inherit): this reusable workflow
(secrets-inherit)
📍 Affects 8 files
.github/workflows/rhiza_benchmark.yml#L23-L23(this comment).github/workflows/rhiza_book.yml#L32-L32.github/workflows/rhiza_ci.yml#L29-L29.github/workflows/rhiza_codeql.yml#L29-L29.github/workflows/rhiza_marimo.yml#L31-L31.github/workflows/rhiza_scorecard.yml#L39-L39.github/workflows/rhiza_weekly.yml#L31-L31.github/workflows/rhiza_paper.yml#L42-L43🤖 Prompt for AI Agents
Source: Linters/SAST tools