Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/guix-nix-policy.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Guix/Nix Package Policy
on: [push, pull_request]

permissions: read-all

jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Enforce Guix primary / Nix fallback
run: |
# Check for package manager files
HAS_GUIX=$(find . -name "*.scm" -o -name ".guix-channel" -o -name "guix.scm" 2>/dev/null | head -1)
HAS_NIX=$(find . -name "*.nix" 2>/dev/null | head -1)

# Block new package-lock.json, yarn.lock, Gemfile.lock, etc.
NEW_LOCKS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E 'package-lock\.json|yarn\.lock|Gemfile\.lock|Pipfile\.lock|poetry\.lock|cargo\.lock' || true)
if [ -n "$NEW_LOCKS" ]; then
echo "⚠️ Lock files detected. Prefer Guix manifests for reproducibility."
fi

# Prefer Guix, fallback to Nix
if [ -n "$HAS_GUIX" ]; then
echo "✅ Guix package management detected (primary)"
Expand All @@ -25,5 +31,5 @@ jobs:
else
echo "ℹ️ Consider adding guix.scm or flake.nix for reproducible builds"
fi

echo "✅ Package policy check passed"
13 changes: 7 additions & 6 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
# SPDX-License-Identifier: AGPL-3.0-or-later
# Deploy Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
Expand Down Expand Up @@ -27,16 +28,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
uses: actions/jekyll-build-pages@b178f9334b208360999a0a57b523613563698c66 # v1.0.13
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1

# Deployment job
deploy:
Expand All @@ -48,4 +49,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164e12d9cc034896e2ea8aed2d03feed65 # v4.0.5
27 changes: 17 additions & 10 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,55 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Code Quality
on: [push, pull_request]

permissions: read-all

jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Check file permissions
run: |
find . -type f -perm /111 -name "*.sh" | head -10 || true

- name: Check for secrets
uses: trufflesecurity/trufflehog@main
uses: trufflesecurity/trufflehog@8a2639a09a43832dcde73f78f7c9eb8cfe498ec0 # v3.88.26
with:
path: ./
base: ${{ github.event.pull_request.base.sha || github.event.before }}
head: ${{ github.sha }}
continue-on-error: true

- name: Check TODO/FIXME
run: |
echo "=== TODOs ==="
grep -rn "TODO\|FIXME\|HACK\|XXX" --include="*.rs" --include="*.res" --include="*.py" --include="*.ex" . | head -20 || echo "None found"

- name: Check for large files
run: |
find . -type f -size +1M -not -path "./.git/*" | head -10 || echo "No large files"

- name: EditorConfig check
uses: editorconfig-checker/action-editorconfig-checker@main
uses: editorconfig-checker/action-editorconfig-checker@64a66abd86fb07d9a6f0ddc46b4d6a8bf51f3a4e # v2.0.0
continue-on-error: true

docs:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Check documentation
run: |
MISSING=""
[ ! -f "README.md" ] && [ ! -f "README.adoc" ] && MISSING="$MISSING README"
[ ! -f "LICENSE" ] && [ ! -f "LICENSE.txt" ] && [ ! -f "LICENSE.md" ] && MISSING="$MISSING LICENSE"
[ ! -f "CONTRIBUTING.md" ] && [ ! -f "CONTRIBUTING.adoc" ] && MISSING="$MISSING CONTRIBUTING"

if [ -n "$MISSING" ]; then
echo "::warning::Missing docs:$MISSING"
else
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/rsr-antipattern.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# RSR Anti-Pattern CI Check
# SPDX-License-Identifier: AGPL-3.0-or-later
# RSR Anti-Pattern CI Check
#
# Enforces: No TypeScript, No Go, No Python (except SaltStack), No npm
# Allows: ReScript, Deno, WASM, Rust, OCaml, Haskell, Guile/Scheme
Expand All @@ -12,11 +12,15 @@ on:
pull_request:
branches: [main, master, develop]

permissions: read-all

jobs:
antipattern-check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: Check for TypeScript
run: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
name: OSSF Scorecard
on:
push:
Expand All @@ -14,17 +15,17 @@ jobs:
security-events: write
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false

- name: Run Scorecard
uses: ossf/scorecard-action@v2.4.3
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif

- name: Upload results
uses: github/codeql-action/upload-sarif@v4
uses: github/codeql-action/upload-sarif@45c3735bb49d9db0f52accd65a74a86f6a0da4b6 # v3.31.9
with:
sarif_file: results.sarif
18 changes: 12 additions & 6 deletions .github/workflows/security-policy.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Security Policy
on: [push, pull_request]

permissions: read-all

jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Security checks
run: |
FAILED=false

# Block MD5/SHA1 for security (allow for checksums/caching)
WEAK_CRYPTO=$(grep -rE 'md5\(|sha1\(' --include="*.py" --include="*.rb" --include="*.js" --include="*.ts" --include="*.go" --include="*.rs" . 2>/dev/null | grep -v 'checksum\|cache\|test\|spec' | head -5 || true)
if [ -n "$WEAK_CRYPTO" ]; then
echo "⚠️ Weak crypto (MD5/SHA1) detected. Use SHA256+ for security:"
echo "$WEAK_CRYPTO"
fi

# Block HTTP URLs (except localhost)
HTTP_URLS=$(grep -rE 'http://[^l][^o][^c]' --include="*.py" --include="*.js" --include="*.ts" --include="*.go" --include="*.rs" --include="*.yaml" --include="*.yml" . 2>/dev/null | grep -v 'localhost\|127.0.0.1\|example\|test\|spec' | head -5 || true)
if [ -n "$HTTP_URLS" ]; then
echo "⚠️ HTTP URLs found. Use HTTPS:"
echo "$HTTP_URLS"
fi

# Block hardcoded secrets patterns
SECRETS=$(grep -rEi '(api_key|apikey|secret_key|password)\s*[=:]\s*["\x27][A-Za-z0-9+/=]{20,}' --include="*.py" --include="*.js" --include="*.ts" --include="*.go" --include="*.rs" --include="*.env" . 2>/dev/null | grep -v 'example\|sample\|test\|mock\|placeholder' | head -3 || true)
if [ -n "$SECRETS" ]; then
echo "❌ Potential hardcoded secrets detected!"
FAILED=true
fi

if [ "$FAILED" = true ]; then
exit 1
fi

echo "✅ Security policy check passed"
19 changes: 12 additions & 7 deletions .github/workflows/wellknown-enforcement.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Well-Known Standards (RFC 9116 + RSR)
on:
push:
Expand All @@ -13,32 +14,36 @@ on:
- cron: '0 9 * * 1'
workflow_dispatch:

permissions: read-all

jobs:
validate:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

- name: RFC 9116 security.txt validation
run: |
SECTXT=""
[ -f ".well-known/security.txt" ] && SECTXT=".well-known/security.txt"
[ -f "security.txt" ] && SECTXT="security.txt"

if [ -z "$SECTXT" ]; then
echo "::warning::No security.txt found. See https://github.com/hyperpolymath/well-known-ecosystem"
exit 0
fi

# Required: Contact
grep -q "^Contact:" "$SECTXT" || { echo "::error::Missing Contact field"; exit 1; }

# Required: Expires
if ! grep -q "^Expires:" "$SECTXT"; then
echo "::error::Missing Expires field"
exit 1
fi

# Check expiry
EXPIRES=$(grep "^Expires:" "$SECTXT" | cut -d: -f2- | tr -d ' ' | head -1)
if date -d "$EXPIRES" > /dev/null 2>&1; then
Expand All @@ -59,7 +64,7 @@ jobs:
[ ! -f ".well-known/security.txt" ] && [ ! -f "security.txt" ] && MISSING="$MISSING security.txt"
[ ! -f ".well-known/ai.txt" ] && MISSING="$MISSING ai.txt"
[ ! -f ".well-known/humans.txt" ] && MISSING="$MISSING humans.txt"

if [ -n "$MISSING" ]; then
echo "::warning::Missing RSR recommended files:$MISSING"
echo "Reference: https://github.com/hyperpolymath/well-known-ecosystem/.well-known/"
Expand Down
Loading
Loading