Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
sshconfig-lint — OpenSSH 클라이언트 구성 파일을 위한 규칙 기반 린터로, 중복 호스트, 누락된 ID 파일, 취약한 알고리즘, 와일드카드 정렬 문제, 위험한 설정을 감지하며 JSON 출력 및 CI 친화적인 종료 코드를 제공합니다. | Kitploit
도구/GitHubGitHub/noah4ever/sshconfig-lint
General Purpose UtilitiesStatic AnalysisCode AnalysisConfiguration AuditingNetwork SecurityDevSecOps
GitHubnoah4ever/sshconfig-lint

sshconfig-lint

OpenSSH 클라이언트 구성 파일을 위한 규칙 기반 린터로, 중복 호스트, 누락된 ID 파일, 취약한 알고리즘, 와일드카드 정렬 문제, 위험한 설정을 감지하며 JSON 출력 및 CI 친화적인 종료 코드를 제공합니다.

저장소 보기
165개월 전아직 검토되지 않음

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

sshconfig-lint

~/.ssh/config 파일을 일반적인 실수에 대해 린트합니다.

중복 호스트 블록, 누락된 ID 파일, 와일드카드 순서 문제, 취약한 알고리즘, 중복 지시문 등을 검사합니다. 사이클 감지 기능이 있는 Include 지시문을 지원합니다.

https://github.com/user-attachments/assets/4d995679-baed-4f20-9ba8-8f3ec94c64fd

설치

빠른 설치 (Linux / macOS)

root@kitploit:~
curl -fsSL https://raw.githubusercontent.com/Noah4ever/sshconfig-lint/main/install.sh | bash

기본값을 재정의하려면 VERSION=v0.1.0 또는 INSTALL_DIR=~/.local/bin을 설정하세요.

macOS (Homebrew)

root@kitploit:~
brew tap Noah4ever/tap
brew install sshconfig-lint

선택적으로 untap Noah4ever/tap을 실행하여 tap을 제거하고 tap 목록을 깨끗하게 유지하세요.

Cargo

root@kitploit:~
cargo install sshconfig-lint

AUR

sshconfig-lint-bin - 미리 빌드된 바이너리

root@kitploit:~
yay -S sshconfig-lint-bin
root@kitploit:~
paru -S sshconfig-lint-bin

미리 빌드된 바이너리

릴리즈 페이지에서 바이너리를 받으세요.

사용법

root@kitploit:~
# 기본 ~/.ssh/config 린트
sshconfig-lint

# 특정 파일 린트
sshconfig-lint --config /path/to/config

# json 출력
sshconfig-lint --format json

# 경고를 오류로 처리 (CI에서 유용)
sshconfig-lint --strict

# Include 해석 생략
sshconfig-lint --no-includes

예시 출력

root@kitploit:~
line 4: [warning] WILDCARD_ORDER (wildcard-host-order) Host 'github.com' appears after 'Host *' (line 1); it will never match because Host * already matched (hint: move Host * to the end of the file)
line 7: [warning] DUP_HOST (duplicate-host) duplicate Host block 'github.com' (first seen at line 4) (hint: remove one of the duplicate Host blocks)
line 3: [error] MISSING_IDENTITY (identity-file-exists) IdentityFile not found: ~/.ssh/id_missing (hint: check the path or remove the directive)

출력은 파일과 줄 번호로 정렬되어 실행 간에 결정적입니다 (CI diff 및 스냅샷에 안정적입니다).

오류는 빨간색, 경고는 노란색, 정보는 청록색입니다. stdout이 터미널이 아니거나 NO_COLOR가 설정되면 색상이 자동으로 비활성화됩니다.

종료 코드

코드의미
0깨끗함, 오류 없음
1최소 하나의 오류 수준 발견 (또는 --strict에서 경고)
2설정 파일을 찾을 수 없음

규칙

각 발견에는 스크립트에서 grep하거나 매칭할 수 있는 안정적인 코드가 있습니다.

발견에는 가능한 경우 힌트가 포함됩니다. 예: "Host *를 파일 끝으로 이동하세요".

처리하는 항목

  • 여러 호스트 패턴 (Host github.com gitlab.com)
  • 여러 포함 패턴 (Include conf.d/*.conf extra.conf)
  • 인라인 주석 (IdentityFile ~/.ssh/id # my key)
  • 따옴표로 묶인 값 (ProxyCommand "ssh -W %h:%p bastion")
  • 사이클 감지가 포함된 Include 해석

개발

root@kitploit:~
cargo test          # 모든 테스트 실행
cargo test --lib    # 단위 테스트만
cargo clippy        # 린트
cargo fmt --check   # 포맷 검사

프로젝트 구조

root@kitploit:~
src/
  main.rs        CLI
  lib.rs         Public API (lint_file, lint_str)
  model.rs       AST types
  lexer.rs       Tokenizer
  parser.rs      Builds config AST from tokens
  resolve.rs     Include expansion + cycle detection
  report.rs      Text and JSON formatters
  rules/
    mod.rs       Rule trait and runner
    basic.rs     Built-in rules
tests/
  fixtures/      Sample config files
  cli.rs         CLI integration tests
  integration.rs Fixture-based tests

규칙 추가

  1. src/rules/basic.rs에서 Rule 트레이트를 구현하세요.
  2. src/rules/mod.rs의 run_all()에 등록하세요.
  3. 먼저 테스트를 작성하고, 통과시키세요.

자세한 내용은 CONTRIBUTING.md를 참조하세요.

라이선스

MIT

도구 다운로드
코드규칙심각도설명
DUP_HOSTduplicate-host경고동일한 패턴을 가진 두 개의 Host 블록
MISSING_IDENTITYidentity-file-exists오류IdentityFile 경로가 존재하지 않음
WILDCARD_ORDERwildcard-host-order경고Host *가 특정 패턴보다 앞에 나타남
WEAK_ALGOdeprecated-weak-algorithms경고취약하거나 사용 중단된 알고리즘 (3des-cbc, arcfour, hmac-md5, ssh-dss 등)
DUP_DIRECTIVEduplicate-directives경고동일한 지시문이 하나의 범위에서 반복됨 (첫 번째 값만 적용)
INSECURE_OPTinsecure-option경고StrictHostKeyChecking no 또는 ForwardAgent yes on Host *와 같은 위험한 설정
UNSAFE_CTRL_PATHunsafe-control-path경고ControlPath에 %h, %p, %r (또는 %C)가 누락됨 — 연결이 소켓을 공유할 수 있음
INCLUDE_CYCLEinclude-cycle오류순환 Include 체인
INCLUDE_READinclude-read오류포함된 파일을 읽을 수 없음
INCLUDE_GLOBinclude-glob오류잘못된 Include glob 패턴
INCLUDE_NO_MATCHinclude-no-match정보Include 패턴과 일치하는 파일 없음