설정 파일 사용하기

config.yaml 파일로 Noir 기본 옵션을 설정합니다.

스캔마다 쓰는 옵션을 config.yaml에 적어 두면 매번 다시 입력하지 않아도 됩니다.

파일 위치

OS 경로
macOS ~/.config/noir/
Linux ~/.config/noir/
Windows %APPDATA%\noir\

다른 디렉터리를 쓰려면 NOIR_HOME을 지정하세요.

설정 파일의 값은 기본값이고, 명령줄 플래그가 있으면 플래그가 우선합니다. 기본 위치가 아닌 곳의 설정을 불러오려면 --config-file <경로>를 쓰세요.

noir scan . --config-file ./ci/noir.yaml

noir config로 설정 파일을 직접 다룰 수도 있습니다.

noir config init   # 기본 설정 생성 (여러 번 실행해도 안전)
noir config show   # 현재 설정 파일 출력
noir config edit   # $VISUAL / $EDITOR로 파일 열기
noir config path   # 최종 경로 출력

디렉터리 구조

~/.config/noir/
├── config.yaml          # 설정 파일
├── cache/
│   └── ai/              # LLM 응답 캐시
└── passive_rules/       # 패시브 스캔 규칙

config.yaml 예제

---
# 기본 스캔 경로
base: "/path/to/my/project"

# 출력에서 항상 색상 사용
color: true

# 기본 출력 형식
format: "json"

# 프로브 대상 기본 URL. exclude_codes / status_codes / probe에도 필요합니다
url: "https://api.example.com"

# 특정 상태 코드 제외 (대상 URL이 있어야 하므로 위 `url`과 함께 씁니다)
exclude_codes: "404,500"

# 기본적으로 모든 태거 활성화
all_taggers: true

# 엔드포인트마다 1-hop 핸들러 callee 첨부
include_callee: true

# AI 리뷰 컨텍스트(guards, callee, sources, sinks, validators, signals) 첨부
ai_context: true

# 기본 AI 제공업체 및 모델
ai_provider: "openai"
ai_model: "gpt-5.5"

# 패시브 보안 스캔 (-P / --passive-scan과 같음)
passive_scan: false
passive_scan_severity: "high"

# 분석기가 실패했거나 건너뛴 파일이 있으면 종료 코드 2
strict: false

# 로딩 스피너 애니메이션 비활성화
no_spinner: false

# 발견된 엔드포인트에 HTTP 프로브 실행 (`url` 필요)
probe: false

# 프로브/내보내기 시 TLS 인증서 검증 건너뛰기 (안전하지 않음)
tls_skip_verify: false

위 설정은 다음 명령과 같습니다.

noir scan /path/to/my/project -f json -u https://api.example.com --exclude-codes "404,500" -T \
  --include callee --ai-context \
  --ai-provider openai --ai-model gpt-5.5

키 참고

noir config init은 지원하는 모든 키에 주석을 단 파일을 만듭니다. 위 예시는 그중 일부만 골라 보여 줍니다. CLI 플래그는 항상 설정 파일보다 우선합니다. 아래 키 이름은 생성된 파일과 같습니다. v0의 send_es / send_proxy 같은 옛 이름도 읽히지만, v1 이름으로 바꿔 두세요.

스캔 경로와 범위

키 타입 CLI 대응 설명
base string 또는 list 경로 인자 / -b 기본 스캔 경로
url string -u / --url 경로 앞에 붙는 기본 URL. status/probe 옵션에 필요
exclude_path CSV glob --exclude-path 일치하는 파일 건너뛰기
techs CSV -t / --techs 자동 탐지에 더해 분석기 집합에 기술 추가
only_techs CSV --only-techs 실행할 기술 탐지기 제한
exclude_techs CSV --exclude-techs 탐지 후 최종 집합에서 기술 제거
concurrency int --concurrency / NOIR_CONCURRENCY 워커 수 (기본값: CPU 수, 4–32 범위로 제한). 우선순위: 플래그 > NOIR_CONCURRENCY > 설정 파일 > 기본값

출력

키 타입 CLI 대응 설명
format string -f / --format plain, json, yaml, oas3, curl, …
output string -o / --output 결과 파일 경로
color bool --no-color의 반대 plain 출력 ANSI 색상
nolog bool --no-log 결과만 표시
no_spinner bool --no-spinner 스피너 애니메이션 비활성화
strict bool --strict 분석기 실패/파일 스킵 시 종료 코드 2
status_codes bool --status-codes 프로브 후 HTTP 상태 코드 첨부 (url 필요)
exclude_codes CSV --exclude-codes 제외할 상태 코드. 이 키만 있어도 프로브함 (url 필요)
include_path bool --include path --include의 레거시 bool 형태
include_techs bool --include techs --include의 레거시 bool 형태
include_callee bool --include callee 1-hop 핸들러 callee 첨부
ai_context bool --ai-context AI 리뷰 컨텍스트 첨부
ai_context_features CSV --ai-context LIST 부분 집합: guards, callee, sources, sinks, validators, signals

파라미터 값

키 타입 CLI 대응 설명
set_pvalue list --pvalue any=… 모든 파라미터 타입 값 채우기
set_pvalue_header list --pvalue header=… 헤더 값
set_pvalue_cookie list --pvalue cookie=… 쿠키 값
set_pvalue_query list --pvalue query=… 쿼리 값
set_pvalue_form list --pvalue form=… 폼 값
set_pvalue_json list --pvalue json=… JSON 본문 값
set_pvalue_path list --pvalue path=… 경로 값

패시브 스캔과 태거

키 타입 CLI 대응 설명
passive_scan bool -P / --passive-scan 패시브 스캔 활성화
passive_scan_path list --passive-scan-path 커스텀 규칙 디렉터리(번들 규칙 대체)
passive_scan_severity string --passive-scan-severity critical / high / medium / low
passive_scan_auto_update bool --passive-scan-auto-update 시작 시 규칙 업데이트
passive_scan_no_update_check bool --passive-scan-no-update-check 업데이트 확인 건너뛰기
all_taggers bool -T / --use-all-taggers 모든 태거 활성화
use_taggers CSV --use-taggers 선택한 태거만 활성화

프로브와 내보내기

키 타입 CLI 대응 설명
probe bool --probe 발견된 엔드포인트에 HTTP 요청 (url 필요)
probe_via string --probe-via 프로브용 프록시 URL
probe_header list --probe-header 추가 프로브 헤더
probe_match list --probe-match 일치하는 엔드포인트만 프로브
probe_skip list --probe-skip 일치하는 엔드포인트 건너뛰기
tls_skip_verify bool --tls-skip-verify 프로브/내보내기/웹훅 TLS 검증 건너뛰기
export_es string --export-es / --export-opensearch Elasticsearch 또는 OpenSearch URL (두 플래그 모두 이 키에 기록)
export_webhook string --export-webhook 엔드포인트 목록 JSON을 POST할 URL

AI와 캐시

키 타입 CLI 대응 설명
ai_provider string --ai-provider 제공업체 접두사 또는 전체 URL
ai_model string --ai-model 모델 이름
ai_key string --ai-key / NOIR_AI_KEY 공유하는 설정이라면 NOIR_AI_KEY나 --ai-key-file을 쓰세요
ai_agent bool --ai-agent 에이전트형 tool-calling 루프 활성화
ai_agent_max_steps int --ai-agent-max-steps 에이전트 루프 상한
ai_no_optimize bool --ai-no-optimize LLM 옵티마이저 단계를 건너뜀
ai_dry_run bool --ai-dry-run 제공업체로 보낼 내용만 출력하고 전송하지 않음
ai_include_sensitive bool --ai-include-sensitive 자격 증명 파일도 제공업체로 전송
ai_native_tools_allowlist CSV --ai-native-tools-allowlist 네이티브 툴 사용을 허용할 제공업체
ai_max_token int --ai-max-token 요청당 최대 토큰 (0 = 제공업체 기본값)
ai_max_requests int --ai-max-requests 실행당 최대 AI HTTP 요청 수, 재시도 포함 (0 = 무제한)
ai_stream bool --ai-stream OpenAI 호환 제공업체의 엔드포인트 추출 응답을 SSE로 스트리밍
ai_scope string --ai-scope AI 분석기로 보낼 파일 (all 또는 unmatched)
ai_temperature number --ai-temperature 샘플링 temperature, 0-2 ("" = 0.3)
ai_seed number --ai-seed 지원하는 제공업체에 보내는 샘플링 seed ("" = 없음)
cache_disable bool --cache-disable LLM 응답 캐시 비활성화
cache_clear bool --cache-clear 실행 전 캐시 비우기

Diff와 진단

키 타입 CLI 대응 설명
diff string --diff-path diff 출력용 이전 코드 경로
diff_ref string --diff-ref 비교 기준이 될 git 리비전
fail_on string --fail-on 종료 코드 3을 낼 diff 결과 종류 (쉼표 구분)
config_file string --config-file 보통 CLI로만 지정
debug bool -d / --debug 디버그 로깅
verbose bool --verbose 상세 로깅 (--include path + 모든 태거)