~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
fix: improve OSSF Scorecard scores for Signed-Releases and Token-Permissions
LearningCircuit5c8ff0cb709b
diff --git a/.github/workflows/ai-code-reviewer.yml b/.github/workflows/ai-code-reviewer.ymlindex 970aa7beb8..43e1c82730 100644--- a/.github/workflows/ai-code-reviewer.yml+++ b/.github/workflows/ai-code-reviewer.yml@@ -4,10 +4,7 @@ on:pull_request:types: [opened, labeled]-permissions:- contents: read- pull-requests: write- issues: write+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:comprehensive-review:diff --git a/.github/workflows/checkov.yml b/.github/workflows/checkov.ymlindex 92a527d5cd..b4ddd4e609 100644--- a/.github/workflows/checkov.yml+++ b/.github/workflows/checkov.yml@@ -15,9 +15,7 @@ on:- '.github/workflows/*.yml'workflow_dispatch:-permissions:- contents: read- security-events: write # For uploading SARIF results+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:checkov:diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.ymlindex 7708d10f3e..2d737d3e42 100644--- a/.github/workflows/codeql.yml+++ b/.github/workflows/codeql.yml@@ -19,11 +19,7 @@ on:schedule:- cron: '45 5 * * 0'-permissions:- contents: read- security-events: write- packages: read # Required to fetch CodeQL packs- actions: read # Required for private repositories+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:analyze:diff --git a/.github/workflows/container-security.yml b/.github/workflows/container-security.ymlindex f1aae56bd3..ffdca4d59b 100644--- a/.github/workflows/container-security.yml+++ b/.github/workflows/container-security.yml@@ -10,10 +10,7 @@ on:# Run container security scan daily at 4 AM UTC- cron: '0 4 * * *'-permissions:- contents: read- security-events: write- actions: read # Required for GitHub Actions cache+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:trivy-scan:diff --git a/.github/workflows/danger-zone-alert.yml b/.github/workflows/danger-zone-alert.ymlindex 675e5bb07c..f44ab3e344 100644--- a/.github/workflows/danger-zone-alert.yml+++ b/.github/workflows/danger-zone-alert.yml@@ -15,10 +15,7 @@ on:- '**/decrypt*.py'- '**/crypto*.py'-permissions:- contents: read # Required for checkout- pull-requests: write- checks: write+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:danger-alert:diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.ymlindex 94c11fbdb8..864b4449a9 100644--- a/.github/workflows/dependency-review.yml+++ b/.github/workflows/dependency-review.yml@@ -13,9 +13,7 @@ on:- 'tests/ui_tests/package-lock.json'workflow_dispatch:-permissions:- contents: read- pull-requests: write+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsconcurrency:group: ${{ github.workflow }}-${{ github.ref }}@@ -26,6 +24,9 @@ jobs:name: Dependency Reviewruns-on: ubuntu-latesttimeout-minutes: 10+ permissions:+ contents: read+ pull-requests: writesteps:- name: Checkout Repositorydiff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.ymlindex 3b034a5cf2..ac9ededace 100644--- a/.github/workflows/devskim.yml+++ b/.github/workflows/devskim.yml@@ -10,10 +10,7 @@ on:# Run security linter daily at 10 AM UTC- cron: '0 10 * * *'-permissions:- contents: read- security-events: write- actions: read # Required for workflow status checks+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:devskim-scan:diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.ymlindex 241b6ccf66..a0e288c447 100644--- a/.github/workflows/docker-publish.yml+++ b/.github/workflows/docker-publish.yml@@ -6,14 +6,15 @@ on:repository_dispatch:types: [publish-docker]-permissions:- contents: read # Only need read access for Docker Hub publishing+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:build-amd64:name: Build AMD64 Imageruns-on: ubuntu-latestenvironment: release+ permissions:+ contents: readoutputs:digest: ${{ steps.build.outputs.digest }}@@ -52,6 +53,8 @@ jobs:name: Build ARM64 Imageruns-on: ubuntu-24.04-armenvironment: release+ permissions:+ contents: readoutputs:digest: ${{ steps.build.outputs.digest }}@@ -90,6 +93,8 @@ jobs:name: Security Scanruns-on: ubuntu-latestenvironment: release+ permissions:+ contents: readsteps:- name: Check out the repodiff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.ymlindex cf9cea490f..19dd25d452 100644--- a/.github/workflows/gitleaks.yml+++ b/.github/workflows/gitleaks.yml@@ -10,10 +10,7 @@ on:# Run secret scan daily at 3 AM UTC- cron: '0 3 * * *'-permissions:- contents: read- security-events: write- actions: read # Required for workflow status checks+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:gitleaks:diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.ymlindex 713d08a2cc..67671c14b7 100644--- a/.github/workflows/hadolint.yml+++ b/.github/workflows/hadolint.yml@@ -16,10 +16,7 @@ on:# Run weekly on Tuesday at 9 AM UTC- cron: '0 9 * * 2'-permissions:- contents: read- security-events: write- pull-requests: write # Required for PR comments+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:hadolint:diff --git a/.github/workflows/label-fixed-in-dev.yml b/.github/workflows/label-fixed-in-dev.ymlindex 258bf27728..b18076102f 100644--- a/.github/workflows/label-fixed-in-dev.yml+++ b/.github/workflows/label-fixed-in-dev.yml@@ -4,9 +4,7 @@ on:types: [closed]branches: [dev]-permissions:- issues: write- pull-requests: read+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:label-linked-issues:diff --git a/.github/workflows/osv-scanner.yml b/.github/workflows/osv-scanner.ymlindex c3eed5c9d3..4b922d4681 100644--- a/.github/workflows/osv-scanner.yml+++ b/.github/workflows/osv-scanner.yml@@ -21,11 +21,7 @@ on:push:branches: [ "main" ]-permissions:- # Require writing security events to upload SARIF file to security tab- security-events: write- # Read commit contents- contents: read+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:scan-scheduled:diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex 60b8ed1ab9..acb766bd31 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -6,9 +6,7 @@ on:repository_dispatch:types: [publish-pypi]-permissions:- contents: read- id-token: write+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:# Build frontend if package.json exists (isolated, no secrets)diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 70fc6d2ed4..55453e9515 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -18,26 +18,25 @@ on:type: booleandefault: false-permissions:- contents: read- pull-requests: read+permissions: {} # Minimal permissions at workflow level for OSSF Scorecardjobs:- create-release:+ build:runs-on: ubuntu-latest+ outputs:+ version: ${{ steps.version.outputs.version }}+ tag: ${{ steps.version.outputs.tag }}+ release_exists: ${{ steps.check_release.outputs.exists }}+ hashes: ${{ steps.hash.outputs.hashes }}permissions:- contents: write+ contents: readpull-requests: read- id-token: write # Required for Sigstore keyless signingsteps:- name: Checkout codeuses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0with:- fetch-depth: 0 # Fetch full history for version determination- # Use PAT_TOKEN to ensure releases trigger downstream workflows- # (GITHUB_TOKEN doesn't trigger other workflows by design)- token: ${{ secrets.PAT_TOKEN }}+ fetch-depth: 0- name: Determine versionid: version@@ -93,11 +92,11 @@ jobs:# Generate SBOM in SPDX format (JSON)trivy fs --format spdx-json --output sbom-spdx.json .- echo "✅ Generated SBOM in SPDX-JSON format"+ echo "Generated SBOM in SPDX-JSON format"# Generate SBOM in CycloneDX format (JSON)trivy fs --format cyclonedx --output sbom-cyclonedx.json .- echo "✅ Generated SBOM in CycloneDX format"+ echo "Generated SBOM in CycloneDX format"# Display summaryecho ""@@ -117,13 +116,77 @@ jobs:cosign sign-blob --yes --output-signature sbom-spdx.json.sig --output-certificate sbom-spdx.json.pem sbom-spdx.jsoncosign sign-blob --yes --output-signature sbom-cyclonedx.json.sig --output-certificate sbom-cyclonedx.json.pem sbom-cyclonedx.json- echo "✅ Signed SBOM files with Sigstore"+ echo "Signed SBOM files with Sigstore"echo ""echo "Signature files generated:"ls -lh sbom-*.sig sbom-*.pem+ env:+ COSIGN_EXPERIMENTAL: "true"++ - name: Generate hashes for SLSA provenance+ if: steps.check_release.outputs.exists == 'false'+ id: hash+ run: |+ # Generate SHA256 hashes for all release artifacts+ # Format: base64(sha256hash filename\nsha256hash filename\n...)+ echo "Generating hashes for SLSA provenance..."+ HASHES=$(sha256sum sbom-spdx.json sbom-spdx.json.sig sbom-spdx.json.pem sbom-cyclonedx.json sbom-cyclonedx.json.sig sbom-cyclonedx.json.pem | base64 -w0)+ echo "hashes=$HASHES" >> "$GITHUB_OUTPUT"+ echo "Hashes generated for $(echo "$HASHES" | base64 -d | wc -l) files"- - name: Create GitHub Release using gh CLI+ - name: Upload artifacts for releaseif: steps.check_release.outputs.exists == 'false'+ uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3+ with:+ name: release-artifacts+ path: |+ sbom-spdx.json+ sbom-spdx.json.sig+ sbom-spdx.json.pem+ sbom-cyclonedx.json+ sbom-cyclonedx.json.sig+ sbom-cyclonedx.json.pem+ retention-days: 1++ # Generate SLSA provenance for release artifacts+ provenance:+ needs: [build]+ if: needs.build.outputs.release_exists == 'false'+ permissions:+ actions: read+ id-token: write+ contents: write+ uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]+ with:+ base64-subjects: "${{ needs.build.outputs.hashes }}"+ upload-assets: false # We'll upload manually with the release+ provenance-name: "provenance.intoto.jsonl"++ create-release:+ needs: [build, provenance]+ if: needs.build.outputs.release_exists == 'false'+ runs-on: ubuntu-latest+ permissions:+ contents: write+ pull-requests: read++ steps:+ - name: Download build artifacts+ uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8+ with:+ name: release-artifacts++ - name: Download SLSA provenance+ uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8+ with:+ name: provenance.intoto.jsonl++ - name: List artifacts+ run: |+ echo "Release artifacts:"+ ls -la++ - name: Create GitHub Releaserun: |# Set prerelease flag if neededPRERELEASE_FLAG=""@@ -132,10 +195,10 @@ jobs:fi# Create the release using GitHub CLI with auto-generated notes- # Uses .github/release.yml for categorization based on PR labels- # Includes SBOM files and their Sigstore signatures- gh release create "${{ steps.version.outputs.tag }}" \- --title "Release ${{ steps.version.outputs.version }}" \+ # Includes SBOM files, Sigstore signatures, and SLSA provenance+ gh release create "${{ needs.build.outputs.tag }}" \+ --repo "${{ github.repository }}" \+ --title "Release ${{ needs.build.outputs.version }}" \--generate-notes \$PRERELEASE_FLAG \sbom-spdx.json \@@ -143,13 +206,21 @@ jobs:sbom-spdx.json.pem \sbom-cyclonedx.json \sbom-cyclonedx.json.sig \- sbom-cyclonedx.json.pem+ sbom-cyclonedx.json.pem \+ provenance.intoto.jsonlenv:# Use PAT instead of GITHUB_TOKEN to trigger downstream workflowsGITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}+ trigger-workflows:+ needs: [build, create-release]+ if: needs.build.outputs.release_exists == 'false'+ runs-on: ubuntu-latest+ permissions:+ contents: read++ steps:- name: Trigger Docker publish workflow- if: steps.check_release.outputs.exists == 'false'uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7with:github-token: ${{ secrets.PAT_TOKEN }}@@ -159,14 +230,13 @@ jobs:repo: context.repo.repo,event_type: 'publish-docker',client_payload: {- tag: '${{ steps.version.outputs.tag }}',+ tag: '${{ needs.build.outputs.tag }}',prerelease: ${{ github.event.inputs.prerelease || false }}}});console.log('Triggered Docker publish workflow');- name: Trigger PyPI publish workflow- if: steps.check_release.outputs.exists == 'false'uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7with:github-token: ${{ secrets.PAT_TOKEN }}@@ -176,7 +246,7 @@ jobs:repo: context.repo.repo,event_type: 'publish-pypi',client_payload: {- tag: '${{ steps.version.outputs.tag }}',+ tag: '${{ needs.build.outputs.tag }}',prerelease: ${{ github.event.inputs.prerelease || false }}}});@@ -184,8 +254,9 @@ jobs:- name: Summaryrun: |- echo "Release ${{ steps.version.outputs.version }} created successfully!"+ echo "Release ${{ needs.build.outputs.version }} created successfully!"echo "Triggered PyPI and Docker publishing workflows via repository_dispatch"echo "SBOM files (SPDX, CycloneDX) attached to release"echo "Sigstore signatures (.sig, .pem) attached for verification"+ echo "SLSA provenance (provenance.intoto.jsonl) attached for supply chain security"echo "Check the releases page: https://github.com/LearningCircuit/local-deep-research/releases"diff --git a/.github/workflows/retirejs.yml b/.github/workflows/retirejs.ymlindex ebd7034656..b5d6529111 100644--- a/.github/workflows/retirejs.yml+++ b/.github/workflows/retirejs.yml@@ -28,9 +28,7 @@ on:# Run weekly security scan on Mondays at 4 AM UTC- cron: '0 4 * * 1'-permissions:- contents: read- security-events: write+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsconcurrency:group: ${{ github.workflow }}-${{ github.ref }}diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.ymlindex 9274e96a57..754d3b4f51 100644--- a/.github/workflows/semgrep.yml+++ b/.github/workflows/semgrep.yml@@ -10,10 +10,7 @@ on:# Run security scan daily at 5 AM UTC- cron: '0 5 * * *'-permissions:- contents: read- security-events: write- actions: read # Required for workflow status checks+permissions: {} # Minimal top-level for OSSF Scorecard Token-Permissionsjobs:semgrep-scan: