Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@teamsparta/union-sensor

Latest version: v0.1.1

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: bangminseok, byeonjun_jeon, dh.lee, ganguklee, girae, heo-wonyoung, hjy0951, hysng, jhmoon-sparta, jhyeon-kim, jihee_park, jung-eun, jungwoo0203, jwshin-teamsparta, jy.yang, seongtaek, sparta-sj, spartagames, teamsparta-hyeongjun, trchae, yj.yoon, yoojinoh
1 Versions

Scan summary

@teamsparta/union-sensor was last scanned on 27 Nov 2026 at version 0.1.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 27 Nov 2026.
  • Findings: No rules fired in version 0.1.1.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.1 LATEST 27 Nov 2026 No rules fired

No rules fired in 0.1.1

Findings

Findings for v0.1.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@teamsparta/union-sensor

모든 레포에서 같은 규칙으로 정적 분석을 돌리고, 결과를 고치는 방법(가이드)과 함께 돌려주는 CLI입니다. 사람은 status 표로, 코딩 에이전트는 check 요약으로 봅니다.

  • 규칙은 패키지에 고정돼 있습니다. 레포의 ESLint 설정·버전과 무관하게 누가 돌려도 결과가 같습니다.
  • 기준점(스냅샷) 대비 나빠졌을 때만 실패합니다. 레거시 위반이 많은 레포에도 바로 붙일 수 있습니다.

설치

pnpm add -D @teamsparta/union-sensor
npx union-sensor check

Node 20.12 이상. 설정 파일이 없어도 typecheck · lint · coupling 센서로 돕니다.

센서

센서 무엇을 보나 기준
typecheck 레포 설치본 tsc --noEmit 오류 0
lint 내장 ESLint 규칙 (아래) 위반 0
layers 레이어 의존 방향, 슬라이스 간 import, 구조 밖 파일 위반 0 (설정해야 켜짐)
coupling 파일별 fan-out(이 파일이 import하는 파일 수), 순환 의존. fan-in(이 파일을 import하는 파일 수)은 위반이 아니라 요약·--changed 영향 범위로만 보여줌 fan-out ≤ 12, 순환 0

lint 규칙: max-params 4 · max-lines 300 · max-lines-per-function 200 · complexity 15 · @typescript-eslint/no-explicit-any · no-console(console.error·console.warn은 허용) · 예외 주석 사유 필수(require-description) · 전체 끄기 금지(no-unlimited-disable).

TanStack Query 규칙(공식 @tanstack/eslint-plugin-query): exhaustive-deps · stable-query-client · no-rest-destructuring · no-unstable-deps · infinite-query-property-order · mutation-property-order · prefer-query-options. no-void-query-fn은 타입 정보가 필요해 켜지 않습니다. queryOptions 객체 이름은 xxxQuery로 짓고, xxxQueries는 useQueries에 넘기는 묶음에만 씁니다.

union 가이드 규칙:

규칙 가이드 적용
union/no-enum enum 대신 as const 전체
union/no-passthrough-query-hook useQuery(xxxQuery.detail(id)) 하나만 감싼 use* 훅을 만들지 않고 사용처에서 직접 호출. 옵션을 덧붙이는 훅은 허용 전체
@next/next/no-img-element <img> 대신 next/image, 반응형은 <picture>·srcset Next 레포
union/no-query-hook-in-queries _queries/ 안에서는 useQuery 계열 훅을 호출하지 않음 App Router
union/absolute-shared-import 앱 최상위 _shared·_global은 바깥에서 @/ 절대경로로 import App Router

라우터는 package.json의 next 의존성과 app/·src/app/ 폴더로 판별합니다. 다르면 설정의 router: 'app' | 'pages' | 'none'으로 지정합니다.

임계값은 레포 설정으로 바꿀 수 없습니다. 예외는 파일 단위 주석으로, 사유를 적어서만 둡니다.

/* eslint max-lines: ["error", 400] -- 폼 스키마 정의라 분리하면 추적이 어려움 */
// eslint-disable-next-line no-console -- 배포 스크립트 진행 로그

예외 주석 수도 기록합니다. 위반을 주석으로 덮어도 "악화"로 잡힙니다.

설정 (union-sensor.config.ts 또는 .json)

레포마다 다를 수밖에 없는 것만 둡니다.

import { defineConfig } from '@teamsparta/union-sensor';

export default defineConfig({
  include: ['src/**/*.{ts,tsx}'],
  exclude: ['**/*.generated.ts'],
  tsconfig: 'tsconfig.json',
  router: 'app',
  typecheck: { tsconfigs: ['tsconfig.json'] },
  globalGuidance: ['API 응답 타입은 src/shared/api/types.ts에서 가져올 것.'],
  guidance: {
    'no-console': [
      { paths: ['src/server/**'], text: '서버에서는 logger를 쓸 것.' },
      { paths: ['src/**'], text: '클라이언트 디버그 로그는 커밋 전에 지울 것.' },
    ],
  },
  layers: {
    order: [
      { name: 'app', path: 'src/app' },
      { name: 'features', path: 'src/features', isolated: true },
      { name: 'shared', path: 'src/shared' },
    ],
    forbidOutsideStructure: false,
  },
  coupling: { hubs: ['app/_global/_providers/**'] },
  sensors: [{ name: 'stack-rules', command: 'node scripts/stack-rules.mjs', guidance: 'Stack DS 규칙' }],
});
  • layers.order는 위에서 아래 순서입니다. 아래 레이어는 위 레이어를 import할 수 없습니다. isolated: true인 레이어 안의 슬라이스(바로 아래 폴더)끼리도 import할 수 없습니다.
  • guidance는 규칙별 가이드를 덮어씁니다. 배열이면 경로별로 처음 맞는 항목을 씁니다.
  • coupling.hubs는 여러 파일을 조립하는 게 역할인 파일(프로바이더 묶음 등)을 fan-out 검사에서 뺍니다. 순환 검사는 그대로 합니다.
  • 센서를 끄려면 typecheck: false, lint: false, coupling: false.

명령

union-sensor check                      # 에이전트용 요약. 실패하면 exit 1
union-sensor check --all                # 기존 위반까지 전부
union-sensor check --changed            # 커밋 안 된 변경의 영향 범위(호출자 수)
union-sensor check --base origin/main   # 브랜치 전체 변경의 영향 범위
union-sensor check --fail-on threshold  # 기존 위반이 있어도 실패
union-sensor check --json               # 원시 결과
union-sensor review --base origin/main  # 위험도 점수와 판정(리뷰 생략 가능·리뷰 필요). 항상 exit 0
union-sensor review --base origin/main --ocr ocr.json  # open-code-review 결과를 합쳐서
union-sensor review --base origin/main --into body.md  # PR 설명 파일 맨 위에 끼워 넣어서
union-sensor snapshot                   # 현재 상태를 기준점으로 저장
union-sensor status                     # 마지막 check 결과 표
union-sensor claude-hook                # Claude Code Stop 훅
union-sensor guard-commit               # Claude Code PreToolUse 훅: 커밋 훅 우회 차단

종료 코드: 0 통과 · 1 실패 또는 센서 실행 오류 · 2 설정·사용법 오류.

review — 이 PR을 봐야 하나, 본다면 어디를

check는 막고, review는 보고만 합니다. 결과는 PR 설명 맨 위에 넣을 마크다운입니다. 사람이 PR 전체를 읽지 않고 여기 적힌 곳만 보는 것을 전제로 합니다.

export default defineConfig({
  review: {
    hard: [
      {
        name: '결제',
        paths: ['src/payment/**'],
        question: '결제 금액 계산이 바뀝니다. 의도한 변경인가요?',
        checklist: '금액은 서버 응답 값만 쓴다. 클라이언트에서 다시 계산하지 않는다.',
      },
    ],
    skip: ['src/generated/**'],
    logCalls: ['logEvent', 'sendLog'],
  },
});

위험도 점수(0~100)를 매기고, 점수로 두 단계를 나눕니다.

재료 점수
로직 변경 줄 수 10줄 이하 0 · 50줄 이하 10 · 200줄 이하 20 · 500줄 이하 30 · 1,500줄 이하 50 · 그 초과 60
로직 파일 수 2개 이하 0 · 10개 이하 5 · 30개 이하 10 · 그 초과 15
새 린트 위반 바뀐 소스 파일에서 기준 대비 늘어난 위반이 1건이라도 있으면 25
설정·의존성처럼 소스가 아닌 파일 10
판정 조건 PR 라벨
🔴 리뷰 필요 50점 이상, 또는 hard 경로의 코드를 고침 (점수와 무관) 리뷰 필요
🟢 리뷰 생략 가능 50점 미만 리뷰 생략 가능

바뀐 파일이 전부 테스트 · 문서 · 스타일 · 타입 선언만 있는 파일 · 이미지·정적 파일 · skip 경로 · 삭제 · 주석과 포맷만 바뀐 파일이면 0점입니다. 줄 수와 파일 수는 include에 드는 소스 파일만 셉니다. 이런 파일, include 밖의 코드(모노레포의 백엔드 등), 설정·lock 파일은 세지 않습니다. 테스트·문서 파일은 하드 룰에서 뺍니다. lint: false면 린트 위반 점수는 붙지 않습니다.

점수표는 세 레포 PR 841건의 48시간 내 fix율로 확인했습니다(전체 줄 수 기준). 10점 미만 6% · 10~49점 9% · 50점 이상 28%이고, 레포별 AUC는 0.69 · 0.77 · 0.73입니다. 지금 기준(include 안의 소스 줄 수, 두 단계)으로는 academia 199건만 다시 확인했고, 50점 미만 10%(14/134) · 50점 이상 28%(18/65), AUC 0.71로 전체 줄 수 기준(0.72)과 비슷했습니다. 점수의 대부분은 크기입니다. 줄 수만으로도 0.66~0.75가 나오고, 500줄 이하에서 위험한 PR을 가려내는 재료는 찾지 못했습니다. 결제처럼 작아도 봐야 하는 영역은 점수가 아니라 hard로 지정합니다.

  • 🟢는 한 줄입니다.
  • 🔴는 "확인이 필요한 곳"(하드 룰 → AI의 동작 지적)과 "코드 구조"(가이드 지적, 첫 문장만 보이고 나머지는 접힘)를 합쳐 최대 5개 냅니다.
  • 🔴는 그 아래에 "먼저 볼 파일"을 변경이 큰 순으로 3개 적습니다. 위 지적이 이미 가리킨 파일은 뺍니다.
  • "확인하지 못한 것"에 E2E 미실행, 테스트 유무가 파일 단위라는 점, 여러 곳에서 쓰는데 테스트가 없는 파일(최대 2개)이 들어갑니다.
  • 접힌 "파일별 근거"에 파일별 변경 줄 수 · 분류 · 쓰는 파일 수 · 테스트 유무 · 최근 90일 변경 횟수가 들어갑니다.
가이드 배정과 OCR 규칙 파일

AI가 볼 규칙의 원본은 union 가이드 문서(apps/docs/contents/ground-rules/**)의 frontmatter입니다.

---
review:
  enforce: ai            # ai | eslint | none
  severity: medium
  applies_to: ['**/*.{ts,tsx}']
  trigger: hook-with-multiple-queries
  detect: 한 훅이 서로 다른 도메인의 서버 데이터를 함께 조회해 UI 한 곳에서 쓸 묶음으로 반환한다
  do_not_flag:
    - 같은 도메인의 쿼리만 묶은 훅
---
  • trigger는 AI를 부르기 전에 코드가 판정하는 조건입니다. 걸린 파일에만 그 가이드가 붙습니다.
    • hook-with-multiple-queries: use* 함수가 쿼리 훅을 2개 이상 호출
    • state-only-hook: use* 함수가 useState·useCallback·useMemo만 호출
    • log-outside-component: 컴포넌트도 로깅 래퍼도 아닌 함수가 logCalls의 함수를 호출
  • 문서를 고친 뒤 pnpm guides로 src/review/guides.generated.ts를 다시 만듭니다. 안 맞으면 테스트가 실패합니다.
  • review는 파일별 규칙을 .union-sensor/cache/ocr-rule.json에 씁니다. open-code-review(OCR)에 --rule로 넘기는 형식입니다.
    • 모든 파일: 동작 문제만 보고 스타일·네이밍·린트가 잡는 것은 지적하지 않는 기본 규칙. OCR 내장 TS 규칙을 대신합니다.
    • 하드 룰 파일: 설정의 checklist가 덧붙습니다.
    • 가이드가 붙은 파일: 가이드의 detect·do_not_flag·본문이 덧붙습니다.
CI — 모든 PR에 AI 리뷰를 붙이기

판정은 review가 규칙으로 하고, OCR은 모든 PR에서 "어디를 봐야 하는지"만 찾습니다. OCR 지적 수는 판정을 바꾸지 않습니다.

name: union-sensor-review
on: pull_request
jobs:
  review:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write
    env:
      BASE: origin/${{ github.base_ref }}
      OCR_LLM_URL: ${{ secrets.OCR_LLM_URL }}
      OCR_LLM_TOKEN: ${{ secrets.OCR_LLM_TOKEN }}
      OCR_LLM_MODEL: claude-sonnet-5-5
      OCR_USE_ANTHROPIC: 'true'
      GH_TOKEN: ${{ github.token }}
      PR: ${{ github.event.pull_request.number }}
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: corepack enable && pnpm install --frozen-lockfile
      - run: npm install -g @alibaba-group/open-code-review@1.13.6 && ocr config set language Korean
      - run: pnpm exec union-sensor review --base $BASE --json > .union-sensor/cache/sensor.json
      - run: ocr review --from $BASE --rule .union-sensor/cache/ocr-rule.json --format json --audience agent --max-tokens-budget 800000 -o .union-sensor/cache/ocr.json
        continue-on-error: true
      - run: |
          if [ -f .union-sensor/cache/ocr.json ]; then OCR="--ocr .union-sensor/cache/ocr.json"; fi
          gh pr view "$PR" --json body --jq .body > .union-sensor/cache/body.md
          pnpm exec union-sensor review --base $BASE $OCR --into .union-sensor/cache/body.md > .union-sensor/cache/next.md
          LABEL=$(jq -r .label .union-sensor/cache/sensor.json)
          REMOVE=$(jq -r '[.labels[] | select(. != $label)] | join(",")' --arg label "$LABEL" .union-sensor/cache/sensor.json)
          gh pr edit "$PR" --body-file .union-sensor/cache/next.md --add-label "$LABEL" --remove-label "$REMOVE"
  • 첫 review가 규칙 파일을 만들고, OCR이 그 규칙으로 리뷰하고, 두 번째 review --ocr가 둘을 합쳐 보고서를 냅니다.
  • 보고서는 PR 설명 맨 위에 들어갑니다. 앞뒤 마커(<!-- union-sensor:review:start -->, :end -->) 사이만 바꾸므로 작성자가 쓴 설명은 그대로 남고, 커밋마다 같은 자리가 갱신됩니다.
  • 라벨 두 개(리뷰 생략 가능, 리뷰 필요)는 레포에 미리 만들어 둡니다. 판정이 바뀌면 이전 라벨을 떼고 새 라벨을 붙입니다.
  • 점수와 라벨만 쓰려면 OCR 설치·실행 두 단계와 $OCR을 빼면 됩니다. AI 호출이 없어 3초 안팎에 끝납니다.
  • OCR이 실패해도 보고서는 올라갑니다. 그때는 "AI 리뷰를 돌리지 않았습니다"가 "확인하지 못한 것"에 남습니다.
  • 🟢 PR은 한 줄입니다. OCR 지적이 있을 때만 그 아래에 붙습니다(최대 5개, 심각도순).
  • OCR 지적이 0건이어도 🔴는 그대로입니다.
  • OCR 결과와 PR 설명 파일은 .union-sensor/cache/ 아래에 둡니다. .union-sensor/ 밖에 두면 변경 파일로 잡힙니다.
  • academia 500줄 이하 PR 15건 기준 PR당 $0.04~0.13, 1,000줄 PR은 $0.5 안팎이었습니다(claude-sonnet-5-5).
작성 단계 리뷰 (Claude Code)

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @teamsparta/union-sensor

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229