Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(security): resolve zizmor template injection vulnerabilities (#1668)

LearningCircuit74782b7c4d1f
diff --git a/.github/workflows/danger-zone-alert.yml b/.github/workflows/danger-zone-alert.yml
index eb3f7815b5..ea8d2e4dd9 100644
--- a/.github/workflows/danger-zone-alert.yml
+++ b/.github/workflows/danger-zone-alert.yml
@@ -93,10 +93,13 @@ jobs:
- name: Create status check
if: steps.analyze.outputs.has_dangers == 'true'
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
+ env:
+ RISK_LEVEL: ${{ steps.analyze.outputs.risk_level }}
+ WORKFLOW_CONCLUSION: ${{ steps.analyze.outputs.workflow_conclusion }}
with:
script: |
- const risk_level = '${{ steps.analyze.outputs.risk_level }}';
- const workflow_conclusion = '${{ steps.analyze.outputs.workflow_conclusion }}';
+ const risk_level = process.env.RISK_LEVEL;
+ const workflow_conclusion = process.env.WORKFLOW_CONCLUSION;
// Determine status check details based on severity
let title, summary;
@@ -126,18 +129,23 @@ jobs:
- name: Add labels
if: steps.analyze.outputs.has_dangers == 'true'
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
+ env:
+ WORKFLOW_CONCLUSION: ${{ steps.analyze.outputs.workflow_conclusion }}
+ ENCRYPTION_MODIFIED: ${{ steps.analyze.outputs.encryption_modified }}
+ AUTH_MODIFIED: ${{ steps.analyze.outputs.auth_modified }}
+ RISK_LEVEL: ${{ steps.analyze.outputs.risk_level }}
with:
script: |
const labels = ['security-review-needed'];
- const workflow_conclusion = '${{ steps.analyze.outputs.workflow_conclusion }}';
+ const workflow_conclusion = process.env.WORKFLOW_CONCLUSION;
- if ('${{ steps.analyze.outputs.encryption_modified }}' === 'true') {
+ if (process.env.ENCRYPTION_MODIFIED === 'true') {
labels.push('touches-encryption');
}
- if ('${{ steps.analyze.outputs.auth_modified }}' === 'true') {
+ if (process.env.AUTH_MODIFIED === 'true') {
labels.push('touches-authentication');
}
- if ('${{ steps.analyze.outputs.risk_level }}' === 'CRITICAL') {
+ if (process.env.RISK_LEVEL === 'CRITICAL') {
labels.push('critical-changes');
}
if (workflow_conclusion === 'failure') {
diff --git a/.github/workflows/sync-main-to-dev.yml b/.github/workflows/sync-main-to-dev.yml
index 7fa97d69b6..5b475e9bad 100644
--- a/.github/workflows/sync-main-to-dev.yml
+++ b/.github/workflows/sync-main-to-dev.yml
@@ -132,6 +132,10 @@ jobs:
- name: Create or Update Pull Request
if: steps.check_sync.outputs.sync_needed == 'true'
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
+ env:
+ BRANCH_NAME: ${{ steps.create_branch.outputs.branch_name }}
+ MERGE_CONFLICTS: ${{ steps.merge_attempt.outputs.merge_conflicts }}
+ CONFLICTED_FILES: ${{ steps.merge_attempt.outputs.conflicted_files }}
with:
# SECURITY: Use GITHUB_TOKEN (not PAT_TOKEN) for PR creation
# - Ensures PR is created by github-actions[bot] account
@@ -140,9 +144,9 @@ jobs:
# This complements PAT_TOKEN usage in checkout (see above)
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
- const branchName = '${{ steps.create_branch.outputs.branch_name }}';
- const hasConflicts = '${{ steps.merge_attempt.outputs.merge_conflicts }}' === 'true';
- const conflictedFiles = `${{ steps.merge_attempt.outputs.conflicted_files }}`.split('\n').filter(f => f.trim());
+ const branchName = process.env.BRANCH_NAME;
+ const hasConflicts = process.env.MERGE_CONFLICTS === 'true';
+ const conflictedFiles = (process.env.CONFLICTED_FILES || '').split('\n').filter(f => f.trim());
const timestamp = new Date().toISOString();
let title, body;
@@ -269,10 +273,12 @@ jobs:
if: steps.check_sync.outputs.sync_needed == 'true' && steps.merge_attempt.outputs.merge_conflicts == 'false'
id: verify_commits
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
+ env:
+ BRANCH_NAME: ${{ steps.create_branch.outputs.branch_name }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
- const branchName = '${{ steps.create_branch.outputs.branch_name }}';
+ const branchName = process.env.BRANCH_NAME;
// Find the PR we just created/updated
const { data: prs } = await github.rest.pulls.list({
@@ -352,6 +358,8 @@ jobs:
if: steps.verify_commits.outputs.safe_to_merge == 'true'
id: auto_approve
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
+ env:
+ PR_NUMBER: ${{ steps.verify_commits.outputs.pr_number }}
with:
# SECURITY: Use PAT_TOKEN for approval (different from PR creator)
# - PR was created by GITHUB_TOKEN (github-actions[bot])
@@ -359,7 +367,7 @@ jobs:
# - Prevents self-approval (GitHub requirement)
github-token: ${{ secrets.PAT_TOKEN }}
script: |
- const prNumber = ${{ steps.verify_commits.outputs.pr_number }};
+ const prNumber = parseInt(process.env.PR_NUMBER, 10);
if (!prNumber) {
console.log('No PR number found, skipping approval');
@@ -389,13 +397,15 @@ jobs:
- name: Enable auto-merge
if: steps.auto_approve.outputs.approved == 'true'
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
+ env:
+ PR_NUMBER: ${{ steps.verify_commits.outputs.pr_number }}
with:
# SECURITY: Use PAT_TOKEN for auto-merge enablement
# - Requires same permissions as approval
# - Must be same actor that approved the PR
github-token: ${{ secrets.PAT_TOKEN }}
script: |
- const prNumber = ${{ steps.verify_commits.outputs.pr_number }};
+ const prNumber = parseInt(process.env.PR_NUMBER, 10);
try {
// Enable auto-merge (will wait for status checks)