Skip to content
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .agents/docs/1_DOMAIN_CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 1. Domain Context
**프로젝트 명**: AI 캠퍼스 모임 (MVP 1차)
**핵심 목표**: 에브리타임 시간표와 캘린더 연동을 통해 대학생들의 공통적인 빈 시간을 자동으로 탐색하고 일정을 잡아주는 프론트엔드 환경 구축
**핵심 스택**: `Next.js 14`, `React`, `TypeScript`, `Tailwind CSS v3`, `shadcn/ui`, `Vitest`, `Playwright`

### 주요 도메인

| 도메인 | 설명 | 핵심 파일 |
|--------|------|-----------|
| 스케줄링 | 가용시간 교집합, .ics 파싱, 시간 슬롯 관리 | `src/lib/scheduling/` |
| 인증 | 카카오/구글 소셜 로그인, Supabase Auth | `src/app/(auth)/`, `src/lib/supabase/` |
| UI 컴포넌트 | TimeGrid, ParticipantList 등 도메인 전용 | `src/components/schedule/` |

### 주요 변경 사항
- Next.js 14버전 초기화 및 App 라우터 아키텍처 스캐폴딩 구성 완료 (2026.04.14)
- TDD 기반 프로젝트 구조 수립: Vitest + RTL + Playwright 도입, PRD 기반 폴더 스켈레톤 생성 (2026.04.15)
- Tailwind v3 + shadcn/ui HSL 디자인 토큰 체계 정립 (2026.04.15)
- CI 파이프라인에 lint → test → build 검증 단계 추가 (2026.04.15)
33 changes: 33 additions & 0 deletions .agents/docs/2_EXECUTION_PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 2. Execution Plan
**진행 상태**: `Phase 3 (TDD 기반 프로젝트 구조 수립 완료)`

### 완료된 작업 (Done)
- [x] PRD 구조 분석 및 핵심 기술 스택(14분기점) 추출
- [x] Next.js 14 + Tailwind + TypeScript 보일러플레이트 적용 (MOIM 리포지토리)
- [x] Socratic Auto-sync 기본 컨텍스트 1,2,3 초기화
- [x] shadcn/ui 기반 설정(components.json, utils, css var 등) 디폴트 구성 완료
- [x] GitHub Action CI/CD (lint & build test) 배포 구축
- [x] GitHub PR/이슈 템플릿 양식 추가 완료
- [x] 커밋 및 브랜치 규칙 강제화 시스템 세팅 (Husky, commitlint, lint-staged)
- [x] 초보자 친화적 `convention.md` 문서와 `.env.example` 작성 완료
- [x] 시스템적 방어벽(GitHub Actions): PR 및 이슈 템플릿 준수율 자동 검증기 추가
- [x] 테스트 프레임워크 설치 (Vitest + React Testing Library + Playwright)
- [x] PRD 기반 폴더 스켈레톤 생성 (라우팅, 컴포넌트, 비즈니스 로직, 타입)
- [x] 핵심 알고리즘 샘플 테스트 작성 (findCommonSlots — 6개 케이스 통과)
- [x] CI에 테스트 실행 단계 추가 (lint → test → build)
- [x] ARCHITECTURE.md 프로젝트 구조 가이드 작성
- [x] Tailwind v3 + shadcn HSL 디자인 토큰 호환 수정
- [x] ESLint underscore prefix 허용 규칙 추가
- [x] 보안 문제 해결 (GitHub Actions Script Injection 조치 완료)
- [x] 스켈레톤 컴포넌트 시맨틱 HTML(WAI-ARIA) 속성 사전 반영
- [x] 테스트 엣지 케이스 추가 및 Next.js 14 최신 보안 패치 적용
- [x] 랜딩 페이지(page.tsx) 기본 템플릿 제거 및 MOIM Placeholder 적용

### 향후 작업 (To-Do)
- [ ] UI 컴포넌트 실제 구현 (TimeGrid, ParticipantList, AvailabilityResult)
- [ ] Supabase 백엔드 연동 및 OAuth 기본 환경 연결
- [ ] 로그인 페이지 UI + 카카오/구글 소셜 로그인 구현
- [ ] 일정 생성 페이지 폼 UI 구현
- [ ] 참여자 입력 페이지 (캘린더 연동 / 수동 입력) 구현
- [ ] .ics 파서 TDD 구현
- [ ] E2E 테스트 작성 (호스트/참여자 플로우)
58 changes: 58 additions & 0 deletions .agents/docs/3_FILE_INDEX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 3. File Index Map
**현재 디렉터리 위치**: `C:\Users\kksu1\Dev\MOIM`

### 설정 파일 (루트)
| 파일 | 역할 |
|------|------|
| `package.json` | 의존성 & 스크립트 (dev, build, test, lint) |
| `tsconfig.json` | TypeScript 컴파일러 설정, `@/` 경로 별칭 |
| `tailwind.config.ts` | Tailwind v3 + shadcn HSL 디자인 토큰 |
| `vitest.config.ts` | 단위 테스트 러너 설정 (jsdom, 경로 별칭) |
| `playwright.config.ts` | E2E 테스트 설정 (Chromium, localhost:3000) |
| `.eslintrc.json` | ESLint 규칙 (underscore prefix 허용) |
| `commitlint.config.js` | 커밋 메시지 검증 규칙 |
| `components.json` | shadcn/ui CLI 설정 |

### 소스 코드 (`src/`)
| 경로 | 역할 |
|------|------|
| `src/app/layout.tsx` | 루트 레이아웃 (Geist 폰트, 메타데이터) |
| `src/app/page.tsx` | `/` 랜딩 페이지 |
| `src/app/globals.css` | 전역 CSS + 디자인 토큰 (HSL 변수) |
| `src/app/(auth)/layout.tsx` | 인증 전용 레이아웃 (GNB 없음) |
| `src/app/(auth)/login/page.tsx` | `/login` 소셜 로그인 페이지 |
| `src/app/schedule/create/page.tsx` | `/schedule/create` 일정 생성 |
| `src/app/schedule/[id]/page.tsx` | `/schedule/:id` 참여자 진입 |
| `src/components/ui/` | shadcn 원시 컴포넌트 |
| `src/components/schedule/TimeGrid.tsx` | When2meet 시간 그리드 (스켈레톤) |
| `src/components/schedule/ParticipantList.tsx` | 참여자 현황 (스켈레톤) |
| `src/components/schedule/AvailabilityResult.tsx` | 가용시간 결과 (스켈레톤) |
| `src/lib/scheduling/availability.ts` | ⭐ 가용시간 교집합 알고리즘 (구현 완료) |
| `src/lib/scheduling/ics-parser.ts` | .ics 파일 파서 (스켈레톤) |
| `src/lib/scheduling/time-slot.ts` | 시간 슬롯 유틸 (스켈레톤) |
| `src/lib/scheduling/__tests__/` | 단위 테스트 (availability 6개 통과) |
| `src/lib/supabase/client.ts` | Supabase 브라우저 클라이언트 (스켈레톤) |
| `src/lib/supabase/server.ts` | Supabase 서버 클라이언트 (스켈레톤) |
| `src/lib/utils.ts` | 공용 유틸리티 (cn 함수) |
| `src/types/schedule.ts` | 스케줄링 타입 (TimeSlot, ScheduleSession 등) |
| `src/types/user.ts` | 사용자/인증 타입 |
| `src/test-setup.ts` | Vitest 전역 설정 (jest-dom) |

### E2E 테스트 (`e2e/`)
| 파일 | 역할 |
|------|------|
| `e2e/host-flow.spec.ts` | 호스트 플로우 시나리오 (스켈레톤) |
| `e2e/participant-flow.spec.ts` | 참여자 플로우 시나리오 (스켈레톤) |

### CI/CD (`.github/`)
| 파일 | 역할 |
|------|------|
| `.github/workflows/pr-compliance.yml` | PR 템플릿 검사 + 코드 품질 검증 (lint→test→build) |
| `.github/workflows/issue-compliance.yml` | 이슈 템플릿 준수 검사 |

### 문서
| 파일 | 역할 |
|------|------|
| `ARCHITECTURE.md` | 프로젝트 구조 가이드 (팀원 공유용) |
| `convention.md` | 협업 컨벤션 가이드 (커밋, 브랜치, PR, 이슈) |
| `PRD.md` / `PRD.pdf` | 프로젝트 기획 및 요구사항 정의서 |
32 changes: 32 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# CodeRabbit 설정 파일 (기본 동작 및 프롬프트 튜닝)

language: "ko-KR"
tone_instructions: |
- 당신은 고도로 훈련된, 타협을 모르는 시니어 '안드레이 카파시(Andrej Karpathy)' 페르소나의 리뷰어입니다.
- 군말(No Yapping)이나 불필요한 인사말("제가 도와드릴게요", "훌륭한 PR이네요!")은 전부 생략하고 문제점과 핵심만 간결하고 명확하게 바로 직답하세요.
- 코드를 전면 재작성하지 말고, 변경이 필요한 핵심 코드 라인만 정밀하게 타격(Targeted Editing)하여 최소한으로 수정할 수 있는 피드백을 제공하세요.
- TDD(Test Driven Development) 접근법과 방어적 코딩(Defensive Coding) 원칙을 강제로 수호하세요. 에지 케이스, 타입 안전성, 예외 처리가 부족하면 엄격히 지적하세요.
- 개선점을 제안할 때는 반드시 '왜(Why)' 고쳐야 하는지에 대한 기술적인 근거와 '어떻게(How)' 개선할 수 있는지의 명확한 코드 스니펫(대안 코드)을 제시하세요.
- 단순 린트 수준이 아닌 보안 취약점(OWASP), 렌더링 성능 최적화, 메모리 누수 가능성 등 아키텍처 수준의 깊은 통찰을 제공하세요.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

reviews:
# 모든 PR에 대해 리뷰 봇 작동
request_reviews: true

# 피드백 강도와 톤 (기본값보다 훨씬 까다롭고 논리적)
profile: "assertive"

# 피드백 상세 수준 (0~100 중 100에 가깝게 하여 디테일 극대화)
level: 90

# 리뷰에서 제외할 파일들 (자동 생성 파일 등 제외하여 토큰 낭비 방지)
ignore:
- "*.json"
- "*.md"
- "package-lock.json"
- ".husky/*"
- ".agents/*"

chat:
# PR에서 CodeRabbit을 호출해 질문할 수 있는 기능 활성화
enabled: true
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
14 changes: 14 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 데이터베이스 및 API (Supabase)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url_here
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here

# 캘린더 연동용 OAuth Client (Google/Apple)
GOOGLE_CLIENT_ID=your_google_client_id_here
GOOGLE_CLIENT_SECRET=your_google_client_secret_here

# Gemini API (이미지 분석용)
GEMINI_API_KEY=your_gemini_api_key_here

# 기타 연동 시 필요한 기본 주소 포트 설정 등
NEXT_PUBLIC_BASE_URL=http://localhost:3000
9 changes: 9 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": ["next/core-web-vitals", "next/typescript"],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }
]
}
}
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: 버그 리포트 (Bug Report)
about: 시스템에서 발견된 버그나 오류를 제보합니다.
title: "[BUG] "
labels: bug
assignees: ''

---

## 🐛 버그 설명 (Describe the bug)
<!-- 어떻게 오류가 발생했는지 명확하고 간결하게 설명해주세요 -->
-

## 🔄 재현 방법 (To Reproduce)
<!-- 버그를 재현할 수 있는 구체적인 단계(Step)를 적어주세요. -->
1. '...' 페이지로 이동합니다.
2. '...' 버튼을 누릅니다.
3. '...'에서 오류가 발생합니다!

## 🎯 예상되는 정상 동작 (Expected behavior)
<!-- 원래는 어떻게 작동해야 하는지 설명해주세요 -->
-

## 📸 스크린샷 또는 콘솔 로그 (Screenshots or Logs)
<!-- 오류가 발생한 화면이나 개발자 도구의 에러 로그 캡처를 첨부해주세요 -->

## 💻 환경 정보 (Environment)
- OS: [예: Windows, Mac, iOS]
- 브라우저: [예: Chrome, Safari]
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: 기능 추가 요청 (Feature Request)
about: 프로젝트에 새롭게 들어가야 할 기능이나 아이디어를 제안합니다.
title: "[FEAT] "
labels: enhancement
assignees: ''

---

## 🎯 어떤 기능이 필요한가요? (Is your feature request related to a problem?)
<!-- 해결하고자 하는 문제나 추가할 기능을 간략히 설명해주세요 -->
-

## ✨ 구상하는 해결책 (Describe the solution you'd like)
<!-- 어떻게 구현하면 좋을지, 혹은 무엇이 있으면 좋겠는지 구체적으로 적어주세요 -->
-

## ⚖️ 대안 (Describe alternatives you've considered)
<!-- 고려해본 다른 방법이 있다면 적어주세요 (생략 가능) -->
-

## 📝 추가 정보 (Additional context)
<!-- 참고할 링크나 스크린샷 등이 있다면 첨부해주세요 -->
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## 🚀 작업 내용 (What)
<!-- 어떤 변경 사항이 있는지 간략하게 설명해주세요 -->
-

## 📣 핵심 변경 이유 (Why)
<!-- 이 변경점이나 기능이 왜 필요한지 설명해주세요 -->
-

## 📸 스크린샷 (Visuals, 선택)
<!-- UI 변경이 있다면 캡처 화면을 첨부해주세요 -->

## ⚠️ 체크리스트 (Checklist)
- [ ] 브랜치 컨벤션(feature/00-name)을 지켰나요?
- [ ] 커밋 컨벤션(feat:, fix: 등)을 지켰나요?
- [ ] 작업 전에 관련 이슈를 생성하고 연결했나요?
- [ ] 내 코드가 팀의 기존 코드를 망가뜨리지 않았는지 확인했나요?

## 🔗 관련 이슈 (Issue)
<!-- 예: Close #1 -->
Close #
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI Pipeline

on:
pull_request:
branches:
- main
- dev

jobs:
build_and_lint:
runs-on: ubuntu-latest

steps:
- name: 저장소 체크아웃 (Checkout Repository)
uses: actions/checkout@v4

- name: Node.js 세팅 (Setup Node.js)
uses: actions/setup-node@v4
with:
node-version: '20'

- name: 패키지 설치 (Install Dependencies)
run: npm ci

- name: 코드 린트 검사 (Lint Check)
run: npm run lint

- name: Next.js 빌드 테스트 (Build Test)
run: npm run build
28 changes: 28 additions & 0 deletions .github/workflows/issue-compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 이슈 템플릿 검사 (Compliance Check)

on:
issues:
types: [opened, edited]

jobs:
check-template:
runs-on: ubuntu-latest
steps:
- name: 제목 및 내용 양식 검사
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
run: |
# 1. 제목 규칙 확인 ([FEAT] 또는 [BUG] 포함 여부)
if [[ ! "$ISSUE_TITLE" =~ ^\[(FEAT|BUG)\] ]]; then
echo "❌ 이슈 제목은 템플릿에 지정된 방식인 [FEAT] 또는 [BUG] 접두어로 시작해야 합니다."
exit 1
fi

# 2. 내용 규칙 확인 (개발자가 내용을 채우지 않고 '- ' 빈 상태로 둔 경우)
if echo "$ISSUE_BODY" | grep -q "^\- $"; then
echo "❌ 이슈 내용 중 비어 있는 항목('- ')이 있습니다. 어떻게, 왜 필요한지 구체적으로 작성해주세요."
exit 1
fi

echo "✅ 이슈 템플릿 검사 통과 성공!"
53 changes: 53 additions & 0 deletions .github/workflows/pr-compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: PR 품질 검사 (Compliance + Code Quality)

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
Comment on lines +1 to +7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

GitHub Actions에서 permissions를 명시하지 않았을 때 GITHUB_TOKEN 기본 권한은 어떻게 결정되며, PR 검증 워크플로에 권장되는 최소 권한 예시는 무엇인가?

💡 Result:

GitHub Actions에서 permissions를 명시하지 않았을 때 GITHUB_TOKEN의 기본 권한은 repository 설정(Repository settings > Actions > General > Workflow permissions)에 따라 결정됩니다. 기본값은 "Read repository contents and packages permission"(contents: read, metadata: read, packages: read)입니다. 이는 StackOverflow 로그에서 확인되며(결과 7), Medium 가이드에서도 GITHUB_TOKEN이 read-only로 시작한다고 명시되어 있습니다(결과 9). 공식 문서에서는 permissions를 설정하지 않으면 최소 권한이 적용되며 명시적으로 설정할 것을 권장합니다(결과 1,2,6). PR 검증 워크플로(CI)에 권장되는 최소 권한 예시는 checkout과 빌드를 위해 contents: read입니다. 공식 문서 예시에서 PR 워크플로에 자주 사용되며(결과 1), CodeQL starter에서 contents: read가 기본으로 사용됩니다(결과 12). 추가로 checks나 statuses를 게시하려면 checks: write 또는 statuses: write가 필요할 수 있지만, 최소는 contents: read입니다. 예시: jobs: build: runs-on: ubuntu-latest permissions: contents: read steps: - uses: actions/checkout@v4 # 빌드 스텝들... top_results: [1,2,6,7,9,12]

Citations:


🏁 Script executed:

cat .github/workflows/pr-compliance.yml

Repository: Siul49/moim

Length of output: 1979


permissions 선언 누락으로 저장소 기본값에 위임 중 — 최소 권한을 명시하세요.

Why: GitHub Actions의 GITHUB_TOKENpermissions를 명시하지 않으면 저장소 설정(Repository settings > Actions > General)의 기본값에 의존합니다. 기본값이 광범위하면 PR 검증 워크플로우에서 불필요한 권한이 열립니다. 이 워크플로우는 브랜치명, PR 본문, 커밋 목록만 읽으므로 더 제한된 권한으로 충분합니다.

How: 워크플로우 최상단(on 아래)에 읽기 전용 권한을 명시하세요. 이 워크플로우에 필요한 최소 권한은 저장소 코드 읽기(contents: read)와 PR 메타데이터 읽기(pull-requests: read)입니다.

🔒 최소 권한 설정
 name: PR 품질 검사 (Compliance + Code Quality)
 
 on:
   pull_request:
     types: [opened, edited, synchronize]
 
+permissions:
+  contents: read
+  pull-requests: read
+
 jobs:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr-compliance.yml around lines 1 - 7, Add an explicit,
minimal permissions block to the workflow root (above or directly below the on:
section) to avoid relying on repository defaults: declare permissions: with
contents: read and pull-requests: read so the PR compliance job only has read
access to repository contents and PR metadata; update the top-level YAML in the
file (the workflow name/on block) to include this permissions mapping.

# 1. PR 템플릿 양식 검사
check-template:
runs-on: ubuntu-latest
steps:
- name: 체크리스트 달성도 검사
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: |
# 체크 안 된 항목('- [ ]')이 하나라도 남아있으면 에러 뱉기
if echo "$PR_BODY" | grep -q "\- \[ \]"; then
echo "❌ 체크리스트 중 완료되지 않은 항목이 있습니다! 모두 [x]로 체크해야 Merge할 수 있습니다."
exit 1
fi

# 본문이 너무 짧은지 검사 (최소한의 설명 요구)
if [ ${#PR_BODY} -lt 30 ]; then
echo "❌ PR 설명이 너무 짧습니다. 템플릿에 맞게 어떤 작업을 했는지 명확하게 설명해주세요."
exit 1
fi

echo "✅ PR 템플릿 검사 통과 성공!"

# 2. 코드 품질 검증 (린트 → 테스트 → 빌드)
code-quality:
runs-on: ubuntu-latest
steps:
- name: 📥 코드 체크아웃
uses: actions/checkout@v4

- name: 🟢 Node.js 설치
uses: actions/setup-node@v4
with:
Comment on lines +47 to +53

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

GitHub Actions 보안 가이드에서 uses: owner/action@vX 대신 커밋 SHA pinning을 권장하는 공식 근거와, actions/checkout 및 actions/setup-node의 최신 v4 릴리스 SHA는?

💡 Result:

GitHub Actions 보안 가이드에서 uses: owner/action@vX 대신 커밋 SHA pinning을 권장하는 공식 근거는 GitHub Docs의 "Secure use reference" 페이지입니다. 여기서 "Pin actions to a full-length commit SHA. Pinning an action to a full-length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload."라고 명시되어 있으며, GitHub가 repository 및 organization 수준에서 SHA pinning을 강제할 수 있는 정책을 제공한다고 설명합니다. 또한 GitHub Changelog에서 SHA pinning을 강제하는 정책 지원을 발표했습니다. actions/checkout의 최신 v4 릴리스는 v4.3.1 (2025-08-11 Prepare release v4.3.0 관련 커밋 이후)로, v4 브랜치의 최신 커밋 SHA는 검색 결과에서 명시되지 않았으나 v4 브랜치 commits 페이지에서 확인 가능하며 예시로 과거 릴리스에서 사용된 11bd71901bbe5b1630ceea73d27597364c9af683 (v4.2.2)을 참고. 정확한 최신 SHA는 https://github.com/actions/checkout/commits/v4/의 최상단 커밋입니다. actions/setup-node의 최신 v4 릴리스는 v4.4.0 (2025-04-14)입니다. 정확한 commit SHA는 releases 페이지에서 확인 가능하나 검색 결과에서 직접 명시되지 않았습니다. https://github.com/actions/setup-node/releases/tag/v4.4.0의 태그 커밋 SHA를 사용하세요.

Citations:


서드파티 액션을 태그(@v4)로만 고정하면 공급망 리스크가 남습니다.

Why: Line 47, Line 52는 mutable tag를 사용하므로 태그 재지정 시 의도치 않은 코드가 실행될 수 있습니다. GitHub 공식 보안 가이드에서 "Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository"라고 명시했습니다.

How: 커밋 SHA로 pinning하고 주석으로 대응 버전을 남기세요.

🧷 SHA pinning 예시
       - name: 📥 코드 체크아웃
-        uses: actions/checkout@v4
+        uses: actions/checkout@<FULL_LENGTH_COMMIT_SHA> # v4.x
         with:
           fetch-depth: 0
 
       - name: 🟢 Node.js 설치
-        uses: actions/setup-node@v4
+        uses: actions/setup-node@<FULL_LENGTH_COMMIT_SHA> # v4.x
         with:
           node-version: '20'
           cache: 'npm'

각 액션의 최신 릴리스 SHA는 https://github.com/actions/checkout/commits/v4/https://github.com/actions/setup-node/releases/tag/v4.4.0 에서 확인하세요.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr-compliance.yml around lines 47 - 53, Replace the
mutable tags "actions/checkout@v4" and "actions/setup-node@v4" with their
corresponding commit SHAs to pin to an immutable reference and add a trailing
comment indicating the human-readable release (e.g., v4.x.y) used; update the
workflow step lines that reference uses: actions/checkout@v4 and uses:
actions/setup-node@v4 to use the specific commit SHA for each action and include
a comment with the release tag for traceability.

node-version: '20'
cache: 'npm'

- name: 📦 의존성 설치
run: npm ci

- name: 🔍 린트 검사
run: npm run lint

- name: 🧪 테스트 실행
run: npm run test

- name: 🏗️ 빌드 테스트
run: npm run build
Loading
Loading