
공급망 공격으로부터 패키지 매니저 구성을 강화하세요.
```text
_ _
| | ___ _ __ ___ __ _ _ _ __ _ _ __ | |
/
|/ _ \ '_ \/ __|/ _ | | | |/ | '__/ _ |
| (| | __/ |) _ \ (| | || | (| | | | (| |
_,_|_| ./|/_, |_,|_,|| _,|
|| |___/
Guard your dependencies against supply chain attacks. **단일 정적 바이너리, Rust 크레이트 의존성 0개.**
제공: **[[arnica](https://arnica.io?utm_source=depsguard&utm_medium=referral&utm_campaign=community)]**
## 목차
- [개요](#overview)
- [설치](#install)
- [사용법](#usage)
- [검사 대상](#what-gets-checked)
- [구성 파일 위치](#config-file-locations)
- [긴급 보안 수정](#urgent-security-fix)
- [백업 및 복원](#backups-and-restore)
- [작동 방식](#how-it-works)
- [문제 해결](#troubleshooting)
- [도움말 및 피드백](#help--feedback)
- [가이드](#guides)
- [참고](#see-also)
- [라이선스](#license)
## 개요
DepsGuard는 시스템에서 **npm**, **pnpm**, **yarn**, **bun**, **uv**, **pip**, **poetry**, **aube**를 찾아 해당 구성 파일을 읽고 권장 공급망 설정과 비교한 후 **대화형으로 수정 사항을 적용**할 수 있습니다. 또한 저장소에서 **Renovate** 및 **Dependabot** 구성을 검사합니다. 패키지 설치를 실행하지 않으며, 승인한 구성 파일만 편집하고 변경 전에 **백업**을 만듭니다.
### 주요 기능
- 대화형 TUI: 검사, 검토, 수정 토글, 적용
- 읽기 전용 보고를 위한 `scan` 하위 명령
- 백업을 선택해 파일을 롤백하는 `restore` 하위 명령
- 크로스 플랫폼: Linux, macOS, Windows
- 타사 Rust 크레이트 번들 없음 (표준 라이브러리 + 터미널용 소량의 플랫폼 FFI)
### 기술 스택
| 영역 | 세부 정보 |
|------|---------|
| 언어 | Rust (MSRV **1.74**, `Cargo.toml` 참조) |
| CLI / TUI | `src/main.rs`, `src/ui.rs`, `src/term.rs` |
| 구성 로직 | `src/manager.rs`, `src/fix.rs` |
| 웹사이트 | `docs/` 아래 정적 사이트 (바이너리와 별도) |
## 설치
### 사전 빌드된 바이너리
각 [GitHub 릴리스](https://github.com/arnica/depsguard/releases)에는 다음 플랫폼용 아카이브가 포함됩니다:
- Linux: `x86_64` (glibc), `x86_64` (musl), `aarch64` (glibc)
- macOS: Intel 및 Apple Silicon
- Windows: `x86_64` ZIP (`depsguard.exe` 포함)
플랫폼에 맞는 아카이브를 다운로드하고 압축을 푼 다음 바이너리를 `PATH`에 추가하세요.
릴리스 페이지에서 각 자산 옆에 있는 해당 `.sha256` 파일을 사용하여 무결성을 검증하세요.
### 플랫폼별 설치
#### Linux (APT를 사용한 Debian/Ubuntu)```bash
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://depsguard.com/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/depsguard.gpg
echo "deb [arch=amd64,arm64 signed-by=/etc/apt/keyrings/depsguard.gpg] https://depsguard.com/apt stable main" | sudo tee /etc/apt/sources.list.d/depsguard.list >/dev/null
sudo apt update
sudo apt install depsguard
brew install depsguard
DepsGuard는 [homebrew-core](https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/d/depsguard.rb)에 있으므로 커스텀 tap이 필요하지 않습니다.
> **이전 `arnica/depsguard` tap에서 마이그레이션하시나요?** core formula로 한 번에 전환하세요:
>
> ```bash
> brew uninstall depsguard
> brew untap arnica/depsguard
> brew update
> brew install depsguard
> ```
#### Windows```powershell
# WinGet
winget install Arnica.DepsGuard
# Scoop
scoop bucket add depsguard https://github.com/arnica/depsguard
scoop install depsguard
또는 PowerShell을 통해 수동으로 다운로드:```powershell $zip = "$env:TEMP\depsguard.zip" Invoke-WebRequest -Uri "https://github.com/arnica/depsguard/releases/latest/download/depsguard-x86_64-pc-windows-msvc.zip" -OutFile $zip Expand-Archive -LiteralPath $zip -DestinationPath "$env:TEMP\depsguard" -Force Copy-Item "$env:TEMP\depsguard\depsguard.exe" "$HOME\AppData\Local\Microsoft\WindowsApps\depsguard.exe" -Force depsguard.exe --help
### crates.io```bash
cargo install depsguard
Rust 툴체인과 cargo가 필요합니다.
조직에서 Homebrew, Scoop 또는 WinGet을 통해 DepsGuard를 배포한다면 해당 채널의 지침을 따르세요. 해당 채널의 설정 또는 자동화(Homebrew core PR, 버킷, WinGet PR, CI 시크릿)는 메인테이너용 문서이며, Release & distribution 아래의 AGENTS.md를 참조하세요.
| 채널 | Linux | macOS | Windows | 설치 명령 |
|---|---|---|---|---|
| APT (사용자 지정 저장소) | 예 | 아니요 | 아니요 | sudo apt install depsguard (위 저장소 설정 이후) |
| crates.io | 예 | 예 | 예 | cargo install depsguard |
| Homebrew (homebrew-core) | 예 | 예 | 아니요 | brew install depsguard |
| Scoop (사용자 지정 버킷) | 아니요 | 아니요 | 예 | scoop bucket add depsguard https://github.com/arnica/depsguard ; scoop install depsguard |
| WinGet | 아니요 | 아니요 | 예 | winget install Arnica.DepsGuard |
설치할 때 사용한 채널을 이용하세요.
| 채널 | 업그레이드 명령 |
|---|---|
| Homebrew | brew update && brew upgrade depsguard |
| APT (사용자 지정 저장소) | sudo apt update && sudo apt install --only-upgrade depsguard |
| crates.io | cargo install --force depsguard (최신 릴리스를 재설치) |
| Scoop | scoop update && scoop update depsguard |
| WinGet | winget upgrade Arnica.DepsGuard |
설치된 버전은 언제든 depsguard --version으로 확인할 수 있으며, 최신 버전은 릴리스 페이지에서 확인하세요.
git clone https://github.com/arnica/depsguard.git cd depsguard cargo build --release
바이너리는 `target/release/depsguard`입니다 (Windows에서는 `.exe`). Rust **1.74+**가 필요합니다.
## 사용법```bash
depsguard # interactive: scan, choose fixes, apply
depsguard scan # report only; no writes (exits 1 if action is needed)
depsguard --no-search # skip recursive file search, check local configs only
depsguard restore # restore from a previous backup
depsguard --help # CLI help
depsguard를 실행하면 대화형 TUI가 시작됩니다. 시스템을 스캔하고 발견된 사항을 표로 보여줍니다. 아무 키나 누르면 수정 선택기로 진행합니다. 저장소 수준 설정 검색은 현재 디렉터리에서 시작하여 하위 디렉터리로 진행됩니다. 읽기 전용 보고서에는 depsguard scan을, 재귀적 파일 검색을 건너뛰고 사용자 수준 설정만 확인하려면 depsguard --no-search를 사용하세요.
참고: 일부 설정에는 최소 버전이 필요합니다. 버전이 너무 오래된 경우 다음 메시지가 표시됩니다:
ℹ min-release-age – requires npm ≥ 11.10 (have 10.2.0).npm install -g npm@latest로 업그레이드한 후 다시 실행하세요.
↑ ↓로 목록을 탐색하고 (^u ^d로 페이지 이동), Space를 눌러 수정 항목을 켜고 끕니다. 빠른 필터 키로 파일별 일괄 선택을 할 수 있습니다: a 전체, n .npmrc, u uv.toml 등 – 한 번 누르면 선택, 다시 누르면 선택 해제, 세 번째 누르면 필터가 초기화됩니다. f를 누르면 현재 선택된 수정 항목만 표시됩니다.d를 눌러 적용 전에 변경될 내용의 diff를 확인하세요.Enter를 눌러 선택한 수정 사항을 적용합니다. 파일이 기록되기 전에 타임스탬프가 포함된 백업이 생성됩니다.depsguard restore를 실행하여 백업 목록에서 롤백할 수 있습니다. q 또는 Esc를 눌러 종료하세요.