스킬 authorizing-api-requests
📦

authorizing-api-requests

낮은 위험 ⚙️ 외부 명령어🌐 네트워크 접근🔑 환경 변수

Mailtrap API 요청을 안전하게 인증하기

개발자는 종종 Mailtrap API 토큰을 하드코딩하거나 잘못된 auth 헤더를 사용하여 보안 위험과 통합 오류를 초래합니다. 이 skill은 모든 Mailtrap API 영역에서 토큰 범위 지정, auth 헤더 형식, 안전한 저장, account_id 확인을 위한 신뢰할 수 있는 참조를 제공합니다.

지원: Claude Codex Code(CC)
📊 74 적절함
1

스킬 ZIP 다운로드

2

Claude에서 업로드

설정 → 기능 → 스킬 → 스킬 업로드로 이동

3

토글을 켜고 사용 시작

Agent용 리소스

AI Agent, 크롤러 또는 스크립트가 전체 페이지 대신 깔끔한 컨텍스트가 필요할 때 이 링크를 사용하세요.

테스트해 보기

"authorizing-api-requests" 사용 중입니다. Mailtrap API 호출에는 어떤 auth header를 사용해야 하나요?

예상 결과:

Mailtrap은 두 가지 헤더 형식을 허용합니다. Bearer 형식(Authorization: Bearer $MAILTRAP_API_TOKEN)은 HTTP 규약 및 SDK-generated code와 일치하므로 새 코드에 권장됩니다. Api-Token 형식(Api-Token: $MAILTRAP_API_TOKEN)은 legacy clients용으로 제공됩니다. 둘 중 하나만 사용하고, 둘 다 사용하지 마세요.

"authorizing-api-requests" 사용 중입니다. Mailtrap API token을 안전하게 저장하려면 어떻게 해야 하나요?

예상 결과:

토큰 저장 방식은 환경에 따라 달라집니다. 로컬 개발에서는 환경 변수 또는 .gitignore에 등록된 .env 파일을 사용하세요. CI/CD에서는 provider의 암호화된 secret store를 사용하고 env vars로 주입하세요. production에서는 전용 secret manager를 사용하세요. 토큰을 소스에 하드코딩하거나, CLI flags로 전달하거나, 채팅이나 prompts에 붙여넣지 마세요.

보안 감사

낮은 위험
v1 • 6/3/2026

All 75 static findings are false positives. The SKILL.md is a documentation file containing bash/curl examples in markdown code blocks, not executable scripts. The external_command detections target shell backtick syntax inside code fences showing example curl commands. Network findings reference legitimate mailtrap.io API endpoints. Environment access detections are from best-practices documentation on token storage. The skill is safe documentation content with no executable or malicious code.

1
스캔된 파일
146
분석된 줄 수
10
발견 사항
1
총 감사 수
중간 위험 문제 (4)
Shell command examples in documentation code blocks
The static analyzer detected 56 instances of Ruby/shell backtick execution patterns. All occurrences are bash and curl command examples inside Markdown code fences. The skill is a documentation reference file (SKILL.md) that shows users how to use the Mailtrap API. No commands are executed by the skill itself.
Hardcoded API endpoint URLs in documentation
The analyzer detected 12 URL references to mailtrap.io domains. All URLs point to legitimate Mailtrap API endpoints and documentation pages. The skill describes how to call these endpoints, it does not make network requests itself.
Environment file and dotenv reference in best practices
The analyzer flagged line 53 for env_access (dotenv library). This line is in a 'Where to put tokens' section that recommends using .env files for local development. It is educational content advising secure token storage practices.
Heuristic dangerous combination alert
The static analyzer flagged a CRITICAL heuristic combination of code execution, network, and credential access patterns. The SKILL.md file contains bash code examples with curl commands using env var tokens, which matches this pattern. However, these are documentation examples showing proper API usage, not active malicious behavior.
낮은 위험 문제 (3)
Email sending capability reference
The analyzer flagged line 38 for 'Email sending capability'. This line references the Mailtrap API tokens documentation page. It is describing the Email Sending API scope in the context of token provisioning advice.
Secret manager product names in documentation
Line 55 lists 1Password among recommended secret managers for production token storage. The static analyzer flagged this as credential access. The context is a best-practices recommendation for secure token storage, not credential theft.
System reconnaissance pattern in curl example
Line 116 was flagged for system reconnaissance. This is the beginning of a bash code block showing curl commands to the Mailtrap API. The skill explicitly instructs users to resolve account_id dynamically instead of hardcoding it.
감사자: claude

품질 점수

55
아키텍처
100
유지보수성
87
콘텐츠
65
커뮤니티
64
보안
91
사양 준수

만들 수 있는 것

첫 Mailtrap API 통합

새 Mailtrap API 통합을 구축하는 개발자는 인증을 올바르게 설정해야 합니다. 이 skill은 처음부터 토큰 생성, auth 헤더 선택, 안전한 저장까지 안내합니다.

CI/CD pipeline 토큰 구성

CI/CD pipelines를 구성하는 DevOps engineer는 Mailtrap API 토큰을 환경 변수로 주입해야 합니다. 이 skill은 암호화된 CI secret stores 사용과 권장 env var 명명에 대한 지침을 제공합니다.

API 보안 감사 및 검토

보안 검토자는 Mailtrap API 토큰의 범위가 올바르게 지정되었고, 안전하게 저장되었으며, 소스에 하드코딩되지 않았는지 확인해야 합니다. 이 skill은 참고할 수 있는 best practices와 anti-patterns를 문서화합니다.

이 프롬프트를 사용해 보세요

Mailtrap API 인증을 처음부터 설정하기
Mailtrap Email Sending API에 대한 요청을 인증해야 합니다. 적절한 Authorization 헤더 형식, 권장 환경 변수 이름, 토큰을 안전하게 로드하는 방법을 보여주는 Python 예제 코드를 생성해 주세요.
작업에 맞는 올바른 토큰 범위 선택하기
Mailtrap을 통해 transactional email을 보내고 싶습니다. 어떤 token scope가 필요하고, 어떤 API host를 사용해야 하며, 이 endpoint는 URL path에 account_id가 필요한가요?
account-scoped endpoints를 위한 account_id 확인하기
URL path에 account_id가 필요한 Mailtrap Contacts API를 호출해야 합니다. Accounts API를 사용해 올바른 account_id를 동적으로 확인하는 방법과 이후 요청에 전달하는 방법을 보여 주세요.
안전한 production 통합 구축하기
Mailtrap을 통해 이메일을 보내는 production application을 구축하고 있습니다. secret manager에 토큰 저장, auth 헤더 생성, account_id 확인, sandbox 및 live environments 분리를 포함한 전체 인증 설정을 보여 주세요.

모범 사례

  • 새 코드에서는 HTTP 규약 및 SDK-generated examples와 일치하도록 Bearer auth header 형식을 사용하세요
  • 유출 시 영향을 제한하기 위해 각 API 토큰의 범위를 필요한 최소 영역(one stream, one project, one product area)으로 지정하세요
  • scripts 또는 config에 하드코딩하는 대신 각 session에서 Accounts API를 통해 account_id를 동적으로 확인하세요

피하기

  • 환경 변수에서 로드하는 대신 소스 코드, notebooks 또는 config files에 API 토큰을 하드코딩하는 것
  • 토큰을 command-line flags로 전달하여 shell history, process listings, CI logs에 노출하는 것
  • sandbox testing과 live email sending에 동일한 토큰을 사용하여 sandbox 토큰이 손상될 경우 불필요한 위험을 만드는 것

자주 묻는 질문

Mailtrap은 어떤 auth headers를 허용하나요?
Mailtrap은 두 가지 형식을 허용합니다: Authorization: Bearer $TOKEN(새 코드에 권장) 및 Api-Token: $TOKEN(legacy support). 요청당 하나의 헤더만 사용하세요.
Mailtrap API token은 어디에 저장해야 하나요?
로컬 개발에는 환경 변수를, pipelines에는 암호화된 CI secret stores를, production에는 전용 secret managers를 사용하세요. 토큰을 소스 코드에 하드코딩하지 마세요.
account_id란 무엇이며 언제 필요한가요?
account_id는 Mailtrap 계정의 숫자 식별자입니다. Contacts, Templates, Sending Domains 같은 account-scoped endpoints의 URL path에 필요합니다.
account_id를 자동으로 확인하려면 어떻게 하나요?
API 토큰으로 GET https://mailtrap.io/api/accounts를 호출하세요. 응답은 id, name, access_levels가 포함된 accounts 배열입니다. 올바른 account를 선택하고 이후 요청에서 해당 id를 사용하세요.
sandbox와 live sending에 동일한 토큰을 사용해야 하나요?
아니요. 항상 다른 범위를 가진 별도의 토큰을 사용하세요. sandbox 토큰은 실제 이메일을 보낼 수 없어야 합니다. 이렇게 하면 토큰이 유출되었을 때 피해를 제한할 수 있습니다.
토큰이 여러 accounts에 접근할 수 있으면 어떻게 하나요?
Accounts API 응답을 name 또는 access_levels로 필터링하여 올바른 account를 선택하세요. Access level 1000은 account owner, 100은 admin, 10은 viewer입니다. 항상 첫 번째 결과를 선택하지 마세요.

개발자 세부 정보

파일 구조

📄 SKILL.md