yam-flow 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -0
- package/CHANGELOG.md +12 -0
- package/COMMANDS.md +10 -0
- package/dist/bin/yam.js +21 -4
- package/dist/lib/security-check.d.ts +98 -0
- package/dist/lib/security-check.js +262 -0
- package/dist/lib/security-integration.d.ts +8 -0
- package/dist/lib/security-integration.js +428 -0
- package/package.json +6 -3
- package/references/final-report.md +2 -0
- package/references/security-check.md +131 -0
- package/references/study-note.md +6 -0
- package/skills/deep/SKILL.md +4 -0
- package/skills/mission/SKILL.md +4 -0
- package/skills/quick/SKILL.md +4 -0
- package/skills/ueye/SKILL.md +4 -0
- package/src/bin/yam.ts +20 -4
- package/src/lib/security-check.ts +184 -0
- package/src/lib/security-integration.ts +299 -0
- package/templates/security-check-note.md +42 -0
- package/templates/security-gate.yml +44 -0
- package/yam.manifest.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Yam note security-check starter
|
|
2
|
+
|
|
3
|
+
Copy the block below into the project's Yam note for each run. Replace every placeholder with actual scope/evidence; do not infer a pass from the template. The authoritative status and gate rules are in [Security check contract v1](../references/security-check.md).
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
-- Security check --
|
|
7
|
+
|
|
8
|
+
Contract: security-check-v1
|
|
9
|
+
Run: <unique run ID>; Time: <ISO timestamp with timezone>
|
|
10
|
+
Stage: <commit | push | deploy>; Policy: <stage-policy version>
|
|
11
|
+
Environment: <target environment or explicit local/not-applicable reason>
|
|
12
|
+
Binding: <commit: staged tree and base revision | push: outgoing commit IDs and destination | deploy: artifact digest, source commit, environment and configuration revision>
|
|
13
|
+
Scope: <changed paths and connected security boundaries>
|
|
14
|
+
Checker: <tool/version or named reviewer>; Evidence: <sanitized evidence references>
|
|
15
|
+
|
|
16
|
+
1. SEC-01 : "사용자·관리자·외부 서비스·DB·파일 사이의 신뢰 경계와 보호할 데이터·작업을 식별한다." : 미검증
|
|
17
|
+
- Required at: <stages>; Target/evidence/result/time: <actual check details or missing evidence>
|
|
18
|
+
2. SEC-02 : "명시적으로 허용한 접근만 열고, 사용자·서비스 계정에 필요한 최소 권한만 부여한다." : 미검증
|
|
19
|
+
- Required at: <stages>; Target/evidence/result/time: <actual check details or missing evidence>
|
|
20
|
+
3. SEC-03 : "화면을 우회한 API·서버 함수·DB·파일·백그라운드 작업에서도 사용자·조직·대상별 권한을 확인한다." : 미검증
|
|
21
|
+
- Required at: <stages>; Target/evidence/result/time: <actual check details or missing evidence>
|
|
22
|
+
4. SEC-04 : "계정 정지·승인 철회·탈퇴·소속 변경 후 기존 세션·토큰·캐시에서도 권한 회수가 반영된다." : 미검증
|
|
23
|
+
- Required at: <stages>; Target/evidence/result/time: <actual check details or missing evidence>
|
|
24
|
+
5. SEC-05 : "코드의 보안 정책·migration·ACL·환경 설정이 대상 배포 환경의 실제 상태와 일치한다." : 미검증
|
|
25
|
+
- Required at: <stages>; Target/evidence/result/time: <actual check details or missing evidence>
|
|
26
|
+
6. SEC-06 : "로그인·관리자 인증·세션 만료·로그아웃·비밀번호 재설정·계정 복구가 계정 탈취를 막도록 동작한다." : 미검증
|
|
27
|
+
- Required at: <stages>; Target/evidence/result/time: <actual check details or missing evidence>
|
|
28
|
+
7. SEC-07 : "외부 입력·파일 업로드·출력의 형식·크기·경로를 검증하고 SQL 주입·XSS·SSRF·CSRF 등 해당 공격을 방어한다." : 미검증
|
|
29
|
+
- Required at: <stages>; Target/evidence/result/time: <actual check details or missing evidence>
|
|
30
|
+
8. SEC-08 : "API 키·토큰·개인키·개인정보가 코드·브라우저 번들·로그·점검 기록에 불필요하게 노출되지 않는다." : 미검증
|
|
31
|
+
- Required at: <stages>; Target/evidence/result/time: <actual check details or missing evidence>
|
|
32
|
+
9. SEC-09 : "의존성·CI/CD 권한·배포 자격증명·릴리스 산출물의 출처와 무결성을 확인해 공급망 위험을 통제한다." : 미검증
|
|
33
|
+
- Required at: <stages>; Target/evidence/result/time: <actual check details or missing evidence>
|
|
34
|
+
|
|
35
|
+
Result: BLOCKED
|
|
36
|
+
Blocking: <required-at-current-stage unresolved IDs/subchecks or invalid record fields>
|
|
37
|
+
Deferred: <later-stage missing evidence, required stage, owner and action; none if absent>
|
|
38
|
+
Retry of: <prior run ID or none>
|
|
39
|
+
-- End Security check --
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For `점검 완료 - 보완 필요` or `점검 실패`, add a concrete finding, severity, owner, follow-up action/date and mitigation. For `해당 없음`, add a project/stage-specific reason. Keep missing evidence as `미검증`. All applicable conditional subchecks must appear in the details; one passing test cannot cover an untested requirement.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Copy to the target project after configuring trusted repository variables.
|
|
2
|
+
# Require this job in branch protection and make deployment jobs depend on it.
|
|
3
|
+
name: Security check
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
jobs:
|
|
11
|
+
security:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
timeout-minutes: 10
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
persist-credentials: false
|
|
19
|
+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
|
20
|
+
with:
|
|
21
|
+
node-version: 22.14.0
|
|
22
|
+
# The caller provisions reviewed yam code, policy and evidence before this step.
|
|
23
|
+
# Do not execute PR-supplied code with deployment credentials.
|
|
24
|
+
- name: Validate security evidence for exact revisions
|
|
25
|
+
env:
|
|
26
|
+
SECURITY_POLICY_DIGEST: ${{ vars.SECURITY_POLICY_DIGEST }}
|
|
27
|
+
SECURITY_SOURCE: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
28
|
+
SECURITY_BASE: ${{ github.event.pull_request.base.sha || github.event.before }}
|
|
29
|
+
run: >-
|
|
30
|
+
node /opt/trusted-yam/dist/bin/yam.js security check
|
|
31
|
+
--stage ci --source "$SECURITY_SOURCE" --base "$SECURITY_BASE"
|
|
32
|
+
--policy security/policy.json --policy-digest "$SECURITY_POLICY_DIGEST"
|
|
33
|
+
--evidence security/check.json --json
|
|
34
|
+
- name: Preserve sanitized security notes on success and failure
|
|
35
|
+
if: always()
|
|
36
|
+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
37
|
+
with:
|
|
38
|
+
name: security-check-note
|
|
39
|
+
include-hidden-files: true
|
|
40
|
+
path: |
|
|
41
|
+
.yam/security/notes.md
|
|
42
|
+
.yam/security/runs/
|
|
43
|
+
retention-days: 14
|
|
44
|
+
if-no-files-found: error
|