Skip to content

Unique-AG/ai / .claude/skills/security-maintenance

security-maintenance

Flagged

Triage and fix Dependabot alerts, CodeQL findings and Trivy image scan alerts (search-proxy image CVEs, uv audit findings) in the ai repository. Use when the user asks to address security vulnerabilities, fix Dependabot alerts, resolve CodeQL or code scanning alerts, handle a failed Trivy image scan or uv audit run, or do security maintenance.

FileKindSize
SKILL.mdskill md8.5 KB
references/codeql-patterns.mdmarkdown2.2 KB
references/exclude-newer.mdmarkdown2.1 KB
references/gh-commands.mdmarkdown3.2 KB

references/exclude-newer.md

View on GitHub
# exclude-newer and exclude-newer-package

## How it works

The root `pyproject.toml` sets a global rolling window:

```toml
[tool.uv]
exclude-newer = "3 days"
```

This tells `uv` to ignore any package version whose PyPI artifacts were uploaded after the cutoff. This prevents unexpected breakage from brand-new releases but can conflict with security fixes that were published recently.

## When you need an override

If a security fix version was published within the last 3 days, `uv lock` will fail to resolve it. Add a per-package override:

```toml
[tool.uv.exclude-newer-package]
"<package>" = "YYYY-MM-DD"
```

## Finding the correct timestamp

The timestamp must be the **day after** the latest artifact (wheel/sdist) upload time for the required version. `uv` uses a strict `<` comparison on individual wheel upload times, not the version's publication date.

### Step-by-step

1. Query the PyPI JSON API for the latest artifact upload time:
   ```bash
   curl -s https://pypi.org/pypi/<package>/<version>/json | python3 -c "
   import sys, json
   data = json.load(sys.stdin)['urls']
   print(max(u['upload_time_iso_8601'] for u in data))
   "
   ```

2. Round up to the **next day**. For example:
   - Latest upload: `2026-04-08T23:45:00Z` → use `"2026-04-09"`
   - Latest upload: `2026-04-09T00:01:00Z` → use `"2026-04-10"`

3. Never use the exact upload time or same day — some wheels for different Python versions / platforms are uploaded over several minutes or hours.

## Pruning stale entries

Any `exclude-newer-package` timestamp older than the `exclude-newer` window (currently 3 days) is **redundant** — the global window already allows that version through. Remove these during every maintenance session.

Keep entries that are:
- Set to `false` (permanent overrides, e.g. `unique-toolkit`)
- Still within the 3-day window

## Example

```toml
[tool.uv]
exclude-newer = "3 days"
constraint-dependencies = [
    "cryptography>=46.0.7",
]

[tool.uv.exclude-newer-package]
"unique-toolkit" = false            # permanent — always use latest workspace version
"cryptography" = "2026-04-09"       # security fix, published 2026-04-08 — remove after 2026-04-12
```
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall