종속성 업데이트 에이전트
오래된 npm 패키지, 보안 취약점 및 주요 변경 사항을 지속적으로 스캔합니다. 업그레이드 경로 및 위험 요약이 포함된 PR을 자동으로 제안합니다.
종속성을 최신 상태로 유지하는 것은 보안과 안정성을 위해 중요하지만 수동으로 추적하기는 번거롭습니다. 보안 공지, 새로운 주요 버전 및 전이적 종속성 업데이트가 빠르게 쌓입니다.
종속성 업데이트 에이전트는 패키지 레지스트리를 모니터링하고 취약점과 오래된 패키지를 감지하며 업그레이드 안전성을 평가하고 명확한 위험 평가를 포함한 PR을 엽니다.
에이전트가 수행하는 작업
매주 일정에 따라 종속성 에이전트는:
- 종속성 스캔 —
npm audit,yarn audit또는pnpm audit을 실행하여 취약점과 오래된 패키지 찾기 - 위험별로 필터링 — 문제를 야기할 수 있는 주요 버전과 patch/minor 업데이트 분리
- 주요 변경 사항 평가 — changelog 및 GitHub 릴리스에서 주요 변경 사항 확인
- 업그레이드 테스트 — 업데이트된 종속성에 대해 테스트 스위트 실행
- PR 제안 — 위험 수준별로 그룹화된 PR 생성(일상적 업데이트용 1개, 보안용 1개, 주요 버전별 1개) 및 위험 요약 포함
- 위험 점수 추적 — PR 설명에 CVE 심각도, 채택 비율 및 릴리스 안정성 포함
설정
필수 조건
- 활성 에이전트가 있는 AACWorkflow 작업 영역
- 저장소에 구성된 npm, yarn 또는 pnpm
- 테스트를 실행하는 CI/CD 파이프라인(GitHub Actions, Buildkite 등)
1단계: 종속성 업데이트 에이전트 생성
- Settings → Agents로 이동하여 New Agent 클릭
- 런타임과 공급자 선택
dependency-bot또는upgrade-manager로 이름 지정- 이 시스템 프롬프트 추가:
Role: Dependency update manager
Task: Weekly or on-demand:
1. Run npm/yarn/pnpm audit to find vulnerabilities and outdated packages
2. Separate findings:
- Critical/high CVEs → immediate branch
- Patch & minor updates → routine maintenance branch
- Major version updates → per-package branches (evaluate breaking changes)
3. For each major update:
- Check GitHub releases for breaking changes
- Run full test suite with updated version
- Report pass/fail and any deprecation warnings
4. Create GitHub branches and PRs grouped by risk tier
5. Add detailed PR description with:
- Vulnerability CVE-IDs and severity (CVSS score if available)
- Changelog highlights
- Test results summary
- "⚠️ This is a major version bump" flag for breaking updates
Example PR title format:
- "deps: security updates (npm audit)" → patch updates, no breaks
- "deps: urgent | CVE-2025-1234 (critical)" → security hot-fix
- "deps: major | react@19 + breaking changes" → major version bump
5. Auto-request code review from team (post in Slack/Teams)
6. Link PRs to AACWorkflow issues for tracking2단계: 에이전트 예약
Settings → Automations로 이동하여 예약된 작업 생성:
- Trigger: 매주(예: 목요일 오전 10시)
- Task:
dependency-bot에이전트에 할당 - Template:
dependency-update
또는 cron 작업 사용:
# 매주 목요일 오전 10시
0 10 * * 4 curl -X POST https://aacworkflow.com/api/tasks \
-H "Authorization: Bearer $TOKEN" \
-d '{"agent_id": "dependency-bot", "title": "Weekly dependency scan"}'3단계: 감사 규칙 구성
.aacworkflow/dependency-config.yml 추가:
dependency_audit:
package_managers:
- npm
- pnpm
auto_merge:
enabled: true
conditions:
- type: patch
only_if: all_tests_pass
- type: minor
only_if: all_tests_pass_and_no_deprecation_warnings
- type: major
only_if: manual_approval
skip_packages:
- react # pin in package.json, don't auto-update
- react-dom
- expo # mobile pinned
priority:
critical_cve: "auto-merge if tests pass"
high_cve: "create PR, notify team"
medium_cve: "batch with weekly update"
patches: "batch with weekly update"
notification:
slack_channel: "#dependencies"
mention_on_critical: "@security-team"예제 PR 출력
정기적 업데이트(patch + minor)
Title: deps: routine updates (3 packages)
Body:
## Changes
- chalk 5.3.0 → 5.4.1 (patch)
- lodash-es 4.17.21 → 4.18.0 (minor)
- ts-node 10.9.1 → 10.9.2 (patch)
All changes are backwards compatible. Tests: ✅ PASS (1200 tests in 42s)
---
**Risk:** Low | No deprecation warnings | Routine maintenance
Merging this is safe.보안 업데이트(높은 CVE)
Title: deps: urgent | CVE-2025-1234 (high) in express
Body:
## Vulnerability
**express 4.18.0 → 4.19.5** (patch)
⚠️ **CVE-2025-1234** — Request header parsing DoS
- CVSS Score: 7.5 (High)
- Affected: express < 4.19.5
- Fix: Backport in patch release
https://nvd.nist.gov/vuln/detail/CVE-2025-1234
## Action
This is a security patch with no breaking changes.
Tests: ✅ PASS (1200 tests in 40s)
No deprecation warnings.
---
**Risk:** Low (security patch only)
✅ Safe to merge immediately. Recommend merging today.주요 버전 업데이트(주요 변경 사항)
Title: deps: major | typescript@5.6 (from 5.5)
Body:
## Breaking Changes
**typescript 5.5.4 → 5.6.0** (major)
### Highlights
- Stricter null checking (new flag)
- Removed deprecated `ts.transpileOnly` option
- New `verbatimModuleSyntax` requirement for type imports
### Migration Required
Files needing updates:
- `tsconfig.json`: set `verbatimModuleSyntax: true`
- 3 files with bare `import type` → add `type` keyword
## Test ResultsTypecheck: ⚠️ 12 errors (migration required) Unit tests: ⛔ FAIL (due to typecheck failures) E2E: ⛔ SKIP (blocked by typecheck)
This PR is in **DRAFT** mode. Required steps to merge:
1. Fix tsconfig.json
2. Update import statements
3. Re-run tests (target: all green)
4. Get code review from @backend-lead
---
**Risk:** Medium | Requires migration | Recommend 1–2 day sprint팁 및 모범 사례
위험별로 분리합니다. 정기적 패치를 그룹화하고, 보안 업데이트를 배치하며, 주요 버전을 별도 프로젝트로 취급하세요. 50개 파일 PR 하나로 팀을 압도하지 마세요.
- 제안 전에 테스트 — 업데이트된 종속성에 대해 전체 테스트 스위트 실행; 테스트 통과 또는 실패가 명확하게 사전 존재하는 경우에만 PR 열기
- 전이적 종속성 —
npm audit fix --audit-level=moderate를 사용하여 안전한 전이적 종속성 업데이트 자동 적용 - 잠금 파일 전략 — 잠금 파일 커밋; 병합 전 테스트 실행하여 미묘한 주요 변경 사항 포착
- 보안 우선 — 중요한 CVE가 존재하면 같은 날 PR 열기; 정기 업데이트와 함께 번들하지 마세요
- 사용 중단 경고 — PR에
npm list사용 중단 출력 캡처; 제거 일정 계획 - 팀 알림 — 높은 심각도 PR을 Slack/Teams에 즉시 게시; 주간 요약을 기다리지 마세요
관련 가이드
- CI Triage Agent — 종속성 업데이트가 테스트를 손상시키면 CI 에이전트가 분류를 도움
- Release Notes Agent — 릴리스 노트에 종속성 업데이트 포함