Skip to main content

secrets-management

GitHub secrets and environment variables for MCP servers and CI/CD workflows

来源信息

仓库
Hack23/riksdagsmonitor
最近来源活动
2026年4月16日 09:31
检测到的 SKILL.md 语言
英语
星标
13
Forks
3

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
secrets-management
description
GitHub secrets and environment variables for MCP servers and CI/CD workflows
license
Apache-2.0
# Secrets Management ## 🔴 AI FIRST Quality Principle > **Apply the AI FIRST principle: never accept first-pass quality. Minimum 2 iterations. Read all output, improve every section. No shortcuts.** ## Purpose Secure management of GitHub secrets for MCP servers and CI/CD workflows. ## GitHub Secrets Configuration ### Repository Secrets ```yaml # Settings → Secrets and variables → Actions → Repository secrets COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN - Description: GitHub PAT for MCP server with Insiders API - Scopes: repo, read:org, read:user - Expiration: 90 days (renewal required) ``` ### Environment Secrets ```yaml # Settings → Environments → copilot → Environment secrets COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN - Description: GitHub PAT for Copilot environment - Injected via: COPILOT_AGENT_INJECTED_SECRET_NAMES ``` ## Secret Usage in Workflows ### MCP Configuration ```json // .github/copilot-mcp.json { "mcpServers": { "github": { "env": { "GITHUB_TOKEN": "${{ secrets.COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN }}", "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ secrets.COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN }}" } } } } ``` ### Workflow Usage ```yaml # .github/workflows/copilot-setup-steps.yml env: GITHUB_TOKEN: ${{ secrets.COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN }} GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.COPILOT_MCP_GITHUB_PERSONAL_ACCESS_TOKEN }} ``` ## Security Best Practices - ✅ Never commit secrets to repository - ✅ Use GitHub secret scanning - ✅ Rotate secrets every 90 days - ✅ Minimal scope (least privilege) - ✅ Environment-specific secrets - ✅ Audit secret access logs ## References - **GitHub Secrets**: https://docs.github.com/en/actions/security-guides/encrypted-secrets - **Secret Scanning**: https://docs.github.com/en/code-security/secret-scanning - **SECURITY.md**: Security policy
在 GitHub 查看