implementing-code-signing-for-artifacts
하는 일
이 도구는 프로그램 파일에 ‘디지털 서명’을 추가합니다. 파일이 변조되지 않았고 신뢰할 수 있는 곳에서 왔음을 보장하는 진위 인증 도장과 같습니다.
사용하는 경우
- ✓프로그램 파일이 해커에 의해 수정되지 않았음을 확인하고 싶을 때.
- ✓고객에게 소프트웨어가 진짜이고 변조되지 않았음을 증명해야 할 때.
- ✓공식 ‘서명’이 없는 프로그램을 시스템이 자동으로 거부하도록 하고 싶은 경우.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-code-signing-for-artifacts/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“프로그램 파일이 변조되지 않도록 디지털 서명을 해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 암호화 방법(GPG나 Sigstore 등)을 사용해 각 파일의 고유한 서명을 만듭니다. 이 서명은 나중에 검증되어 파일의 무결성과 출처를 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Implementing Code Signing for Artifacts
When to Use
- When establishing artifact integrity verification to prevent supply chain tampering
- When compliance requires cryptographic proof that build artifacts are authentic and unmodified
- When distributing software to customers who need to verify publisher identity
- When implementing zero-trust deployment pipelines that reject unsigned artifacts
- When meeting SLSA Level 2+ requirements for provenance and integrity
Do not use for encrypting artifacts (signing provides integrity, not confidentiality), for container image signing specifically (use cosign), or for source code authentication (use commit signing).
Prerequisites
- GPG key pair for traditional signing or Sigstore account for keyless signing
- Code signing certificate from a Certificate Authority for public distribution
- CI/CD pipeline with access to signing keys or identity provider
- Verification infrastructure in deployment pipelines
Workflow
Step 1: Generate and Manage Signing Keys
# Generate GPG key for artifact signing
gpg --full-generate-key --batch <<EOF
Key-Type: eddsa
Key-Curve: ed25519
Subkey-Type: eddsa
Subkey-Curve: ed25519
Name-Real: CI Build System
Name-Email: ci-signing@company.com
Expire-Date: 1y
%no-protection
EOF
# Export public key for distribution
gpg --armor --export ci-signing@company.com > signing-key.pub
# Export private key for CI/CD (store in secrets manager)
gpg --armor --export-secret-keys ci-signing@company.com > signing-key.priv
Step 2: Sign Build Artifacts in CI/CD
# .github/workflows/build-sign.yml
name: Build and Sign
on:
push:
tags: ['v*']
jobs:
build-sign:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write # For Sigstore keyless signing
steps:
- uses: actions/checkout@v4
- name: Build artifacts
run: |
make build
sha256sum dist/* > dist/checksums.sha256
- name: Import GPG Key
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
gpg --list-secret-keys
- name: Sign artifacts
run: |
for file in dist/*; do
gpg --detach-sign --armor --local-user ci-signing@company.com "$file"
done
- name: Install cosign for keyless signing
uses: sigstore/cosign-installer@v3
- name: Keyless sign with Sigstore
run: |
for file in dist/*.tar.gz; do
cosign sign-blob "$file" \
--output-signature "${file}.sig" \
--output-certificate "${file}.cert" \
--yes
done
- name: Create Release with signed artifacts
uses: softprops/action-gh-release@v2
with:
files: |
dist/*
dist/*.asc
dist/*.sig
dist/*.cert
Step 3: Verify Signatures in Deployment Pipeline
# Verify GPG signature
gpg --import signing-key.pub
gpg --verify artifact.tar.gz.asc artifact.tar.gz
# Verify Sigstore keyless signature
cosign verify-blob artifact.tar.gz \
--signature artifact.tar.gz.sig \
--certificate artifact.tar.gz.cert \
--certificate-identity ci-signing@company.com \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
# Verify checksums
sha256sum --check checksums.sha256
Step 4: Sign npm Packages with Provenance
{
"scripts": {
"prepublishOnly": "npm run build && npm run test"
},
"publishConfig": {
"provenance": true
}
}
# Publish npm package with provenance attestation
npm publish --provenance
Key Concepts
| Term | Definition |
|---|---|
| Code Signing | Cryptographic process of signing software artifacts to verify publisher identity and artifact integrity |
| Detached Signature | Signature stored in a separate file from the artifact, allowing independent distribution |
| Keyless Signing | Sigstore's approach using short-lived certificates tied to OIDC identities instead of long-lived keys |
| Provenance | Metadata describing how, where, and by whom an artifact was built |
| Transparency Log | Append-only log (Rekor) that records all signing events for public auditability |
| Trust Chain | Hierarchical chain from root CA to signing certificate establishing trust in the signer's identity |
| SLSA | Supply-chain Levels for Software Artifacts — framework defining levels of supply chain security |
…
자주 묻는 질문
디지털 서명이란 무엇인가요?
파일이 진짜이고 서명 후 변경되지 않았음을 증명하는 진위 인증 도장과 같습니다.
서명과 암호화의 차이는 무엇인가요?
서명은 진위와 무결성(누가 만들었는지, 변경되지 않았는지)을 보장합니다. 암호화는 키 없이는 읽을 수 없도록 내용을 보호합니다.
서명하려면 특별한 키가 필요한가요?
네, 공개 키와 개인 키로 이루어진 키 쌍이 필요하거나, 이를 더 간단하게 관리해 주는 Sigstore 같은 서비스(키 없는 방식)를 사용할 수 있습니다.
상세 정보
작성자의 원본 설명
Implements code signing for build artifacts (binaries, packages, containers) using GPG, Sigstore, and platform-specific signing tools, establishing trust chains and verifying signatures in deployment pipelines. Use when establishing artifact integrity checks against supply-chain tampering, proving authenticity to customers, building zero-trust pipelines that reject unsigned artifacts, or meeting S
인기도
- GitHub 스타
- 35k
- 순위
- #8016
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.