본문으로 건너뛰기
Skillpedia
보안35k · #8128

implementing-supply-chain-security-with-in-toto

하는 일

이 도구는 소프트웨어 코드가 안전하게 빌드되고 배포되도록 돕습니다. 모든 개발 단계의 신뢰할 수 있는 기록을 만들어, 모든 것이 계획대로 이루어졌고 부당하게 변경된 것이 없음을 증명합니다.

사용하는 경우

  • ✓소프트웨어 공급망의 보안을 설정할 때.
  • ✓소프트웨어 이미지가 올바른 빌드 절차를 따랐다는 것을 증명해야 할 때.
  • ✓요구 사항을 충족하기 위해 보안 통제를 적용할 때.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-supply-chain-security-with-in-toto/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-supply-chain-security-with-in-toto/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“컨테이너 이미지가 안전하게 빌드되었고 변조되지 않았는지 어떻게 확인할 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 도구는 소프트웨어 빌드의 예상 단계, 각 단계를 수행할 사람, 생성되거나 수정되어야 할 파일을 정의하는 방식으로 작동합니다. 각 단계는 실행과 결과를 증명하는 디지털 서명을 생성합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Implementing Supply Chain Security with in-toto

Overview

in-toto is a CNCF graduated project that ensures the integrity of software supply chains from initiation to end-user installation. It creates a verifiable record of the entire software development lifecycle by generating cryptographically signed attestations (called "link metadata") at each step, proving what happened, who performed it, and what artifacts were produced. For container environments, in-toto verifies that images deployed to Kubernetes followed approved build processes and have not been tampered with.

When to Use

  • When deploying or configuring implementing supply chain security with in toto capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • Python 3.8+ or Go runtime for in-toto client libraries
  • GPG or Ed25519 keys for signing attestations
  • Container build pipeline (Docker, Buildah, or Kaniko)
  • Container registry (Docker Hub, ECR, GCR, or Harbor)
  • Kubernetes cluster for deployment verification

Core Concepts

Supply Chain Layout

The layout is the central policy document that defines:

  • Steps: Ordered operations in the supply chain (clone, build, test, package, push)
  • Functionaries: Authorized entities (people or CI systems) that perform each step
  • Inspections: Client-side verification checks performed at verification time
  • Expected artifacts: Input/output relationships between steps
from in_toto.models.layout import Layout, Step, Inspection
from securesystemslib.interface import import_ed25519_privatekey_from_file

# Create the supply chain layout
layout = Layout()
layout.set_relative_expiration(months=3)

# Define the code clone step
step_clone = Step(name="clone")
step_clone.expected_materials = []
step_clone.expected_products = [["CREATE", "src/*"]]
step_clone.pubkeys = [clone_functionary_keyid]
step_clone.expected_command = ["git", "clone"]
step_clone.threshold = 1

# Define the build step
step_build = Step(name="build")
step_build.expected_materials = [["MATCH", "src/*", "WITH", "PRODUCTS", "FROM", "clone"]]
step_build.expected_products = [["CREATE", "image.tar"]]
step_build.pubkeys = [build_functionary_keyid]
step_build.expected_command = ["docker", "build"]
step_build.threshold = 1

# Define the scan step
step_scan = Step(name="scan")
step_scan.expected_materials = [["MATCH", "image.tar", "WITH", "PRODUCTS", "FROM", "build"]]
step_scan.expected_products = [["CREATE", "scan-report.json"]]
step_scan.pubkeys = [scan_functionary_keyid]
step_scan.threshold = 1

layout.steps = [step_clone, step_build, step_scan]

Link Metadata

Each step execution generates a link file containing:

  • Materials consumed (input artifacts with hashes)
  • Products created (output artifacts with hashes)
  • Command executed
  • Cryptographic signature of the functionary

Verification Process

At deployment time, the verifier checks:

  1. All required steps were performed
  2. Each step was signed by an authorized functionary
  3. Artifact hashes chain correctly between steps
  4. No unauthorized modifications occurred between steps

Implementation

Step 1: Generate Signing Keys

# Generate Ed25519 key pairs for each functionary
mkdir -p keys

# Project owner key (signs the layout)
in-toto-keygen --type ed25519 keys/owner

# CI builder key
in-toto-keygen --type ed25519 keys/builder

# Security scanner key
in-toto-keygen --type ed25519 keys/scanner

Step 2: Create the Supply Chain Layout

#!/usr/bin/env python3
"""Generate in-toto supply chain layout for container builds."""

from in_toto.models.layout import Layout, Step, Inspection
from in_toto.models.metadata import Envelope
from securesystemslib.signer import CryptoSigner
from securesystemslib.interface import import_ed25519_publickey_from_file

def create_container_build_layout():
    layout = Layout()
    layout.set_relative_expiration(months=6)

    # Load functionary public keys
    builder_key = import_ed25519_publickey_from_file("keys/builder.pub")
    scanner_key = import_ed25519_publickey_from_file("keys/scanner.pub")

    layout.keys = {
        builder_key["keyid"]: builder_key,
        scanner_key["keyid"]: scanner_key,
    }

    # Step 1: Source code checkout
    checkout = Step(name="checkout")

…
자주 묻는 질문

소프트웨어 공급망이란 무엇인가요?

코드 작성부터 사용자가 최종적으로 설치하기까지, 소프트웨어를 만들고 전달하는 전체 과정입니다.

링크 메타데이터(link metadata)란 무엇인가요?

각 개발 단계에서 무슨 일이 있었는지, 누가 수행했는지, 어떤 파일을 사용하거나 만들었는지를 자세히 기록한 서명된 디지털 기록입니다.

이것이 컨테이너와 Kubernetes에는 어떻게 적용되나요?

Kubernetes에 배포된 컨테이너 이미지가 승인된 빌드 절차를 거쳤고 빌드 후 수정되지 않았는지 확인해 줍니다.

상세 정보

작성자의 원본 설명

Implements supply chain integrity verification for container builds with the in-toto framework: generating signing keys, defining a supply chain layout, recording pipeline steps as signed link metadata, verifying before deployment, enforcing at Kubernetes admission, and integrating with SLSA. Use when attesting CI/CD pipeline steps, proving an image followed the approved build process, or enforcin

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#8128
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬