Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

gpc-security通用计算机安全

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

259

周安装

11

GitHub Stars

公开资料未说明

下载量

91
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gpc-security(通用计算机安全)
来源仓库:https://github.com/yasserstudio/gpc-skills
仓库路径:skills/gpc-security
安装命令:
npx skills add https://github.com/yasserstudio/gpc-skills --skill gpc-security
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yasserstudio/gpc-skills --skill gpc-security

简介

用于辅助安全审计、权限检查、凭据风险和认证流程排查。

  • 适合梳理敏感配置、检查依赖风险或分析鉴权逻辑。
  • 不能将工具输出直接当作最终结论。gpc-security 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 涉及密钥、令牌或生产系统时,应先确认最小权限和操作边界。
  • 使用时需注意脱敏方式和操作边界限制。

SKILL.md

gpc-security

Credential management, audit logging, and security best practices for GPC.

When to use

  • Securing service account keys and credentials
  • Setting up credential rotation
  • Reviewing audit logs for compliance
  • Handling a compromised service account key
  • Securing GPC in CI/CD pipelines
  • Understanding where GPC stores sensitive data

Inputs required

  • GPC installed and authenticatedgpc auth status
  • Service account key files — for rotation procedures
  • CI/CD platform access — for updating secrets

Procedure

0. Credential storage locations

GPC stores credentials in platform-appropriate secure locations:

DataLocationSecurity
OAuth tokensOS keychain (macOS/Linux/Windows)OS-managed encryption
Token cache~/.cache/gpc/tokens/File permissions (0600)
User config~/.config/gpc/config.jsonFile permissions
Project config.gpcrc.jsonVersion-controlled (no secrets!)
Audit log~/.config/gpc/audit.logJSON Lines, append-only

XDG overrides: XDG_CONFIG_HOME, XDG_CACHE_HOME, XDG_DATA_HOME

Read: references/credential-storage.md for detailed storage architecture and security model.

1. Service account key security

Never commit keys to git

# .gitignore
*.json.key
*-sa.json
service-account*.json
play-store-key.json

Use environment variables in CI

# GitHub Actions — key stored as secret
env:
  GPC_SERVICE_ACCOUNT: ${{ secrets.PLAY_SA_KEY }}

Never store keys in:

  • .gpcrc.json (version-controlled)
  • Dockerfiles or docker-compose files
  • Shell scripts committed to git
  • CI config files (even if they seem private)

2. Key rotation

Rotate service account keys periodically (recommended: every 90 days).

# 1. Create new key in Google Cloud Console
# IAM & Admin → Service Accounts → Keys → Add Key

# 2. Test new key locally
gpc auth login --service-account /path/to/new-key.json
gpc doctor

# 3. Update CI secrets with new key
# GitHub: Settings → Secrets → PLAY_SA_KEY → Update
# GitLab: Settings → CI/CD → Variables → PLAY_SA_KEY → Update

# 4. Verify CI works with new key
# Trigger a test pipeline

# 5. Delete old key in Google Cloud Console
# IAM & Admin → Service Accounts → Keys → Delete old key

# 6. Clear local token cache
rm -rf ~/.cache/gpc/tokens/

Read: references/key-rotation.md for automated rotation patterns and multi-environment strategies.

3. Audit logging

GPC logs all commands to ~/.config/gpc/audit.log in JSON Lines format:

# View recent audit entries
tail -20 ~/.config/gpc/audit.log | jq .

# Filter by command
cat ~/.config/gpc/audit.log | jq 'select(.command == "releases upload")'

# Filter by app
cat ~/.config/gpc/audit.log | jq 'select(.app == "com.example.app")'

# Filter failures
cat ~/.config/gpc/audit.log | jq 'select(.success == false)'

# Filter by date range
cat ~/.config/gpc/audit.log | jq 'select(.timestamp >= "2025-03-01")'

Audit entry structure

{
  "timestamp": "2025-03-09T14:30:00.000Z",
  "command": "releases upload",
  "app": "com.example.app",
  "args": { "track": "beta", "file": "app-release.aab" },
  "user": "sa@project.iam.gserviceaccount.com",
  "success": true,
  "durationMs": 12340
}

4. Secrets redaction

GPC automatically redacts sensitive data in all output:

  • Service account JSON content is never logged
  • Access tokens are never shown in verbose output
  • Private keys are never included in error messages
  • --json output redacts credential fields

5. Least-privilege permissions

Grant only the permissions each service account needs:

Upload-only service account

Play Console permissions:

  • View app information
  • Manage testing (for internal/alpha/beta)
  • Release to production (only if needed)

Read-only monitoring service account

Play Console permissions:

  • View app information
  • View financial data (for reports)
# Verify what a service account can do
gpc auth status --json | jq '.email'
# Then check that email's permissions in Play Console

6. Handling compromised keys

If a service account key is leaked:

# 1. IMMEDIATELY delete the compromised key in Google Cloud Console
# IAM & Admin → Service Accounts → Keys → Delete

# 2. Create a new key
# Same page → Add Key → JSON

# 3. Update all locations using the key
gpc auth login --service-account /path/to/new-key.json

# 4. Update CI secrets
# All platforms using the old key

# 5. Clear token cache
rm -rf ~/.cache/gpc/tokens/

# 6. Review audit log for unauthorized actions
cat ~/.config/gpc/audit.log | jq 'select(.timestamp >= "LEAK_DATE")'

# 7. Review Google Cloud audit logs
# Cloud Console → IAM & Admin → Audit Logs

7. CI/CD security patterns

GitHub Actions

# Use OIDC for keyless auth (advanced)
# Or encrypted secrets (standard)
env:
  GPC_SERVICE_ACCOUNT: ${{ secrets.PLAY_SA_KEY }}

# Restrict to specific branches
if: github.ref == 'refs/heads/main'

# Use environments for approval gates
environment: production

Secret scanning

# Check if keys are in git history
git log --all --full-history -p -- '*.json' | grep -l '"private_key"'

# If found, rotate immediately and clean git history

Verification

  • gpc auth status shows the expected service account email
  • gpc doctor passes all checks
  • .gpcrc.json contains no secrets or key paths
  • Audit log at ~/.config/gpc/audit.log is being written
  • CI secrets are encrypted and not visible in logs
  • Old keys are deleted after rotation

Failure modes / debugging

SymptomLikely CauseFix
Key file committed to gitNot in.gitignoreAdd to.gitignore; rotate key immediately
Token cache stale after rotationOld cached tokensDelete ~/.cache/gpc/tokens/
Audit log not writingConfig dir not writableCheck permissions on ~/.config/gpc/
Service account email unknownKey not inspected`gpc auth status --json \jq '.email'`
CI shows credential in logsKey passed as argumentUse environment variables, never CLI args
Keychain prompt every commandmacOS keychain access not grantedClick "Always Allow" on the prompt

8. Supply chain protection

GPC uses 12 layers of defense against dependency supply chain attacks:

LayerWhat it does
min-release-age=7 in .npmrcBlocks packages published less than 7 days ago
pnpm-lock.yamlExact version pinning, no unexpected upgrades
Socket.dev CI scansocket ci on every PR, blocks on critical alerts
Socket.dev GitHub AppInline PR comments on risky dependency changes
pnpm audit in CIGates PRs on high-severity CVEs (production deps)
GitHub Actions SHA pinsAll 14 action refs pinned to commit hashes, not mutable tags
SBOM (CycloneDX)Bill of materials generated and archived on every npm release
CODEOWNERSSecurity-sensitive paths require explicit review
DependabotWeekly update PRs (direct dependencies only, actions grouped)
Socket CLI wrapperScans every local npm install and npx
CodeQLStatic analysis on every push
GitHub secret scanningBlocks pushes containing 200+ secret patterns

GPC only has 4 runtime dependencies: google-auth-library, commander, protobufjs, yauzl. All API calls use Node.js built-in fetch.

Configuration: socket.yml at repo root controls Socket.dev alert rules. .npmrc controls min-release-age. .github/CODEOWNERS controls review requirements.

9. Developer verification

Google's Android developer verification enforcement begins September 30, 2026 (BR, ID, SG, TH):

gpc verify              # Account-aware status with app info, signing enrollment, days until enforcement
gpc verify --open       # Open verification page in browser
gpc verify --json       # Machine-readable output
gpc verify checklist    # Interactive 7-step readiness walkthrough

gpc doctor includes a verification check. gpc status shows a footer reminder. gpc preflight shows a post-scan reminder.

Signing key audit (v0.9.66+)

gpc doctor --verify                                       # API-side signing cert
gpc doctor --verify --keystore release.jks --store-pass x # Compare local vs API cert
gpc preflight signing                                     # Cert consistency across releases

gpc doctor --verify retrieves the signing certificate from Google Play via generatedApks and optionally compares it against a local keystore (via keytool). gpc preflight signing compares certs across the two most recent bundle versions (exit 6 on mismatch). Both complement the verification workflow by ensuring signing keys are correct before enforcement.

Verification

  • gpc auth status shows the expected service account email
  • gpc doctor passes all checks
  • .gpcrc.json contains no secrets or key paths
  • Audit log at ~/.config/gpc/audit.log is being written
  • CI secrets are encrypted and not visible in logs
  • Old keys are deleted after rotation

Related skills

  • gpc-setup — initial authentication and configuration
  • gpc-user-management — managing team access and permissions
  • gpc-ci-integration — secure CI/CD pipeline configuration
  • gpc-troubleshooting — debugging auth errors

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.95%
按下载量换算33

Claude

33.1%
按下载量换算30

Cursor

18.69%
按下载量换算17

Gemini CLI

9.95%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills