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
28 changes: 28 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 5
cooldown:
default-days: 5
semver-major-days: 14
semver-minor-days: 5
semver-patch-days: 3
groups:
production-deps:
dependency-type: "production"
update-types: ["minor", "patch"]
dev-deps:
dependency-type: "development"
update-types: ["minor", "patch"]

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
cooldown:
default-days: 7
4 changes: 2 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
python-version: "3.13"

- name: Install uv
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true

Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
run: hatch build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
with:
packages-dir: dist/

Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- uses: astral-sh/setup-uv@v7
with:
version: "latest"
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install dependencies
run: uv sync --extra dev
run: uv sync --frozen --extra dev
- name: Run pre-commit hooks
run: uv run pre-commit run --all-files
env:
Expand Down Expand Up @@ -51,10 +49,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "latest"
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install dependencies
run: uv sync --extra dev --extra deploy
run: uv sync --frozen --extra dev --extra deploy
Comment on lines +52 to +54

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Frozen sync breaks ci 🐞 Bug ☼ Reliability

python-package.yml now runs uv sync --frozen in the build job while still testing Python
3.10/3.11, but both pyproject.toml and uv.lock require Python >=3.12, so dependency install will
fail on those matrix entries. This will break CI for PRs/merges until the matrix is aligned with the
supported Python versions (or the lock/project constraints are changed).
Agent Prompt
## Issue description
The CI build matrix includes Python 3.10/3.11, but the project and lockfile require Python >=3.12. With the newly enforced `uv sync --frozen`, installs will fail for unsupported Python versions.

## Issue Context
- `pyproject.toml` declares `requires-python = ">=3.12"`.
- `uv.lock` also declares `requires-python = ">=3.12"`.
- The workflow build job still runs for `python-version: ["3.10", "3.11", "3.12", "3.13"]` and now uses `uv sync --frozen`.

## Fix Focus Areas
- .github/workflows/python-package.yml[40-55]
- pyproject.toml[1-6]
- uv.lock[1-9]

## Suggested fix
Update the build matrix to only include supported versions (e.g., `3.12` and `3.13`). If you truly need to test 3.10/3.11, you must also change `requires-python` and regenerate a compatible lockfile (but that contradicts the current project metadata).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

- name: Test with pytest
run: uv run pytest --no-cov
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 0 # Required for generating release notes

- name: Create Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
generate_release_notes: true
draft: false
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Security scan

on:
pull_request:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard SARIF upload on pull_request from untrusted sources

This workflow triggers on pull_request and always runs SARIF upload, but pull requests from forks (and Dependabot PRs) receive a read-only GITHUB_TOKEN, so write operations like code-scanning uploads can fail with Resource not accessible by integration. Because upload-sarif requires security-events: write, this can cause otherwise-valid PR checks to fail for external contributors; restrict the upload step to trusted contexts (for example push/schedule or non-fork PRs).

Useful? React with 👍 / 👎.

branches: [main]
push:
branches: [main]
schedule:
- cron: '23 6 * * *'

permissions:
actions: read
security-events: write
contents: read

jobs:
scan-scheduled:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@3adb4b14a2b0623876d18d863a498b785fb3752d # v2.3.8
with:
scan-args: |-
-r
./

scan-pr:
if: ${{ github.event_name == 'pull_request' }}
uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@3adb4b14a2b0623876d18d863a498b785fb3752d # v2.3.8
with:
scan-args: |-
-r
./
2 changes: 1 addition & 1 deletion .github/workflows/trufflehog-full-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:

- name: Full Repository Scan
if: inputs.scan_type == 'full-repo'
uses: trufflesecurity/trufflehog@main
uses: trufflesecurity/trufflehog@37b77001d0174ebec2fcca2bd83ff83a6d45a3ab # v3.95.3
with:
extra_args: --results=verified,unknown
2 changes: 1 addition & 1 deletion .github/workflows/trufflehog-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
fetch-depth: 0 # Required for TruffleHog to scan git history

- name: Secret Scanning
uses: trufflesecurity/trufflehog@main
uses: trufflesecurity/trufflehog@37b77001d0174ebec2fcca2bd83ff83a6d45a3ab # v3.95.3
with:
extra_args: --results=verified,unknown
33 changes: 33 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,39 @@ Reference specific personas when requesting work:
- `ADMIN_ALLOWED_IPS` restricts `/admin` when set (comma-separated IPs/CIDR); unset or empty allows all client IPs.
- In `9agents/agent_interviewer`, empty `MANAGE_ALLOWED_IPS` still requires `MANAGE_AUTH_TOKEN` when that env is set; supervaizer’s admin IP middleware has no equivalent token fallback when the allowlist is empty.

## Security and Supply-Chain Rules

These rules are mandatory. Violating them defeats the repo's security controls.

### Branch and commit rules
- Never push directly to `main`. Always work on a branch and open a PR.
- Never force-push to a shared branch.
- Never bypass branch protection or rulesets, even with admin access.
- Always check `git status` before committing — never include `.env`, `*.key`, or credential files.

### Dependency rules
- Never edit `uv.lock` by hand.
- To add a dependency: use `uv add <pkg>`, not direct edits to `pyproject.toml`.
- Never run `uv lock --upgrade` without explicit user approval. Upgrading all deps at once is the exact vector for supply-chain malware.
- To upgrade a single package: `uv lock --upgrade-package <name>`.

### Workflow file rules
- Never modify files in `.github/workflows/` without explicit user approval.
- Never change `permissions:` blocks in workflows.
- Never add `pull_request_target` triggers.
- Never replace a pinned action SHA with a tag. New actions must be pinned to a commit SHA with the version in a comment.

### Secret rules
- Never echo, log, or print environment variables.
- Never read `.env`, `~/.aws/credentials`, `~/.ssh/`, or `~/.pypirc`.

### Publishing rules
- Never run `hatch publish` or any publish command locally. Publishing happens through CI only.
- Never create or modify the `pypi` GitHub environment.

### When in doubt
Ask. Refusing to act is always safer than taking an action that bypasses these rules.

<!-- gitnexus:start -->
# GitNexus — Code Intelligence

Expand Down
33 changes: 33 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Security Policy

## Reporting a vulnerability

Please report security vulnerabilities through GitHub's private vulnerability reporting:
<https://github.com/supervaize/supervaizer/security/advisories/new>

Do not report security issues in public issues, discussions, or pull requests.

We will acknowledge receipt within 72 hours and provide an initial assessment within 7 days.

## Supported versions

| Version | Supported |
|---------|-----------|
| 0.19.x | ✅ |
| < 0.19 | ❌ |

## Supply-chain posture

This repository implements the following controls:

- Branch protection via GitHub rulesets on `main` (enforced on admins)
- Required CI status checks before merge
- Secret scanning with push protection
- Dependabot security updates with a cooldown window on new releases
- `uv sync --frozen` enforced in CI (lockfile cannot silently change)
- Trusted Publishing (OIDC) for PyPI releases — no long-lived publish tokens
- Required reviewer approval on the `pypi` environment before publish secrets are exposed
- Third-party GitHub Actions pinned to commit SHAs
- OSV-Scanner in CI (daily + on every PR) against the OSV.dev malicious package index

If you observe a deviation from this posture, please report it via the private channel above.
Loading