算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
dependency-management【设计与创意】Use this skill when the user says 'Dependabot', 'Renovate', 'dependencies', 'lock file', 'vulnerability scanning', 'update strategy', 'Renovate config', 'dependabot.yml', 'dependency bump', 'automated updates', 'version pinning', 'patch management', 'supply chain security', 'npm audit', 'SBOM'. Covers: Dependabot configuration, Renovate configuration…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Automate dependency updates, vulnerability scanning, and policy enforcement with Dependabot and Renovate.
Exact user phrases: "Dependabot", "Renovate", "dependencies", "lock file", "vulnerability scanning", "update strategy", "dependabot.yml", "dependency bump", "automated updates", "version pinning", "patch management", "supply chain security", "SBOM", "npm audit".
Writes to .github/dependabot.yml, renovate.json, or .github/renovate.json.
dependabot.yml or renovate.json with no extraneous explanation.
No preamble. No postamble. No explanations. No filler/hedging/transitions.
| Feature | Dependabot | Renovate |
|---|---|---|
| Configuration | YAML (dependabot.yml) | JSON (renovate.json) |
| Auto-merge | Via GitHub Actions | Built-in (platformAutomerge) |
| Grouped updates | Manual allow lists | Automatic grouping rules |
| Custom registries | Limited | Extensive (any host) |
| Onboarding PR | No | Yes (configurable) |
| Regex manager | No | Yes (Docker, custom) |
| Presets/shared config | No (org-level only) | Presets, extends, shareable |
| Lock file maintenance | Manual | Built-in schedule |
| Dashboard | Dependencies tab only | Dependency Dashboard PR |
| Rate limiting | GitHub API limits | Configurable concurrency |
| Monorepo support | Per-directory config | Automatic workspace detection |
| Self-hosted | Via GitHub | Via Renovate self-hosted |
| Severity | Response | SLA | Assignee |
|---|---|---|---|
| Critical | Emergency patch, immediate PR | 24 hours | Security team |
| High | Prioritized patch within 7 days | 7 days | Security + dev team |
| Medium | Patch within next release cycle | 30 days | Dev team |
| Low | Patch within next major | 90 days | Dev team |
| Update Type | Auto-Merge | Requires | Risk Level |
|---|---|---|---|
| Patch (devDeps) | Yes | CI passes | Low |
| Patch (dependencies) | Yes | CI + code coverage | Low |
| Minor (devDeps) | Yes | CI passes | Medium |
| Minor (dependencies) | Conditional | CI + review if breaking | Medium |
| Major (any) | Never | Manual review required | High |
| Security (any) | Conditional | CI + security team review | High |
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
timezone: "America/New_York"
versioning-strategy: "increase-if-necessary"
open-pull-requests-limit: 10
rebase-strategy: "auto"
labels:
- "dependencies"
- "npm"
reviewers:
- "team-devs"
assignees:
- "bot-owner"
commit-message:
prefix: "fix"
prefix-development: "chore"
include: "scope"
allow:
- dependency-type: "direct"
ignore:
- dependency-name: "react"
versions: [">=19.0.0"]
- dependency-name: "typescript"
update-types: ["version-update:semver-major"]
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
actions:
patterns:
- "actions/*"
- "github/codeql-action/*"
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
":dependencyDashboard",
":semanticCommits",
"group:allNonMajor"
],
"labels": ["dependencies", "renovate"],
"assigneesFromCodeOwners": true,
"schedule": ["before 9am on monday"],
"timezone": "America/New_York",
"rangeStrategy": "bump",
"lockFileMaintenance": {
"enabled": true,
"schedule": ["before 9am on monday"]
},
"packageRules": [
{
"description": "Auto-merge patch updates",
"matchUpdateTypes": ["patch"],
"automerge": true,
"automergeType": "pr",
"platformAutomerge": true
},
{
"description": "Group dev dependencies",
"matchDepTypes": ["devDependencies"],
"groupName": "devDependencies",
"groupSlug": "dev"
},
{
"description": "Major updates require manual review",
"matchUpdateTypes": ["major"],
"labels": ["major-update"],
"assignees": ["team-lead"],
"reviewers": ["team-lead"]
},
{
"description": "Ignore certain packages",
"matchPackageNames": ["react", "react-dom"],
"allowedVersions": "<19.0.0"
}
],
"vulnerabilityAlerts": {
"enabled": true,
"labels": ["security"],
"assignees": ["security-team"]
},
"prConcurrentLimit": 5,
"prHourlyLimit": 2,
"osvVulnerabilityAlerts": true
}
name: Auto-merge Dependencies
on:
pull_request:
types: [labeled, opened, synchronize]
jobs:
auto-merge:
if: contains(github.event.pull_request.labels.*.name, 'automerge')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm test
- run: npm run build
- uses: pascalgn/automerge-action@v0.16.4
env:
GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
name: Vulnerability Scan
on:
schedule:
- cron: "0 6 * * *"
push:
branches: [main]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm audit --audit-level=high
sbom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: advanced-security/sbom-generator-action@v0.0.1
id: sbom
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.sbom.outputs.sbomPath }}
trivy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: aquasecurity/trivy-action@master
with:
scan-type: fs
scan-ref: .
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH
- uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif
# .gitattributes - ensure lock files are treated as binary for PR diffs
package-lock.json binary
yarn.lock binary
pnpm-lock.yaml binary
Cargo.lock binary
go.sum binary
Gemfile.lock binary
name: SBOM Generation
on:
push:
branches: [main]
schedule:
- cron: "0 0 * * 0"
jobs:
generate-sbom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: CycloneDX/gh-node-module-generatebom@v2
with:
path: .
- uses: actions/upload-artifact@v4
with:
name: sbom
path: bom.xml
name: Dependency Review
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/dependency-review-action@v4
with:
fail-on-severity: high
license-check: true
deny-licenses: GPL-3.0, AGPL-3.0
comment-summary-in-pr: always
.gitignoring lock files means builds are non-reproducible and vulnerability scans are inaccurate. Lock files are the source of truth for what is actually installed. Always commit lock files.
Major version bumps often contain breaking API changes that break builds silently. Auto-merging bypasses review. Always require manual review for major version updates.
Without vulnerability scanning and alerting, critical security patches go unnoticed. An unpatched CVE in a production dependency can lead to exploitation. Enable and monitor vulnerability alerts.
Using @v1 or @main for GitHub Actions means the action can change without notice, potentially breaking CI or introducing supply chain vulnerabilities. Pin to SHA or full semver tag.
Dependabot or Renovate opens 50+ PRs overwhelming CI and reviewers. Set open-pull-requests-limit or prConcurrentLimit. Use grouped updates to reduce PR count.
Auditing only direct dependencies misses vulnerabilities in transitive dependencies. Use npm audit, Dependabot alerts (which scan the full tree), or Renovate vulnerability alerts with OSV.
Running updates daily creates noise. Running updates monthly misses critical security patches. Weekly schedule with security alerts on-demand is the recommended balance.
Dependabot: simplest setup, GitHub-native, limited customization. Renovate: more configurable, grouped updates, regex manager, self-hostable. Manual: outdated immediately, no vulnerability alerting, human error prone. Start with Dependabot for simple projects, Renovate for complex monorepos.
npm audit: built-in, free, limited to npm ecosystem. Snyk: broader language coverage, fix PRs, license checks, paid. Trivy: open-source, fast, covers filesystem, containers, repos, SBOM. Use npm audit as baseline, Trivy for CI scanning, Snyk for enterprise.
npm (package-lock.json): npm standard, deterministic. yarn (yarn.lock): yarn specific. pnpm (pnpm-lock.yaml): pnpm specific, efficient disk. Cargo.lock: Rust standard. go.sum: Go standard, checksum only. Gemfile.lock: Ruby standard. poetry.lock: Python poetry.
After completing this skill:
| Decision | Automated (Dependabot/Renovate) | Manual Updates |
|---|---|---|
| Update frequency | Daily/Weekly PRs | Quarterly releases |
| Breaking changes | Automated major bump PRs | Manual review per package |
| CI requirement | Must pass test suite per PR | Full regression suite |
| Team size | Any | Small teams (< 5) |
| Risk profile | Low to moderate | High (accumulated drift) |
| Maintenance burden | Low (bot handles PRs) | High (scheduled upgrade weeks) |
| Aspect | Monorepo | Polyrepo |
|---|---|---|
| Shared dep updates | Single lockfile, atomic | Per-repo, coordinated releases |
| Version conflicts | Single version constraint | Multiple, drift possible |
| CI complexity | Single pipeline | N pipelines, matrix builds |
| Publishing | Internal packages first | External registry needed |
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":separateMajorMinor",
":combinePatchMinorUpdates",
"group:monorepos",
"schedule:weekly"
],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch"],
"matchCurrentVersion": ">=1.0.0",
"automerge": true,
"automergeType": "pr",
"platformAutomerge": true
},
{
"matchDepTypes": ["devDependencies"],
"automerge": true,
"schedule": ["before 9am on Monday"]
},
{
"matchPackageNames": ["react", "react-dom"],
"groupName": "React Core",
"labels": ["frontend", "react"]
},
{
"matchManagers": ["dockerfile"],
"enabled": true,
"schedule": ["before 9am on Monday"]
}
],
"vulnerabilityAlerts": {
"enabled": true,
"labels": ["security"]
},
"lockFileMaintenance": {
"enabled": true,
"schedule": ["before 9am on Monday"]
}
}
#!/usr/bin/env bash
set -euo pipefail
audit_dependencies() {
local manifest=$1
case "$manifest" in
package.json)
npm audit --json > audit-report.json
jq '.vulnerabilities | to_entries | map(select(.value.severity == "critical")) | length' audit-report.json
;;
pom.xml)
mvn org.owasp:dependency-check-maven:check \
-DfailBuildOnCVSS=7 \
-Dformat=JSON
;;
requirements.txt)
pip-audit --desc on --format json > audit-report.json
;;
esac
}
package-lock.json, poetry.lock, requirements.txt hashes) to pin transitive depsschedule:before 9am on Mondaylatest tags in Docker or npm — always pin to exact semver rangesnpm update without review — batch updates hide breaking changesnpm install in CI for deterministic, faster installs (skips resolution)npm dedupe or Yarn constraints to reduce bundle size.npmrc with engine-strict=true and ignore-scripts=false to block postinstall exploits