Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

gitops-repo-auditgitops 回购审计

Agent Skill

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

总安装

3,329

周安装

136

GitHub Stars

119

下载量

1,066
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/fluxcd/agent-skills --skill gitops-repo-audit

简介

gitops-repo-audit 用于辅助安全审计、权限检查和凭据风险排查,适合梳理敏感配置和分析鉴权逻辑。

  • 适用于 Codex、Claude、Cursor、Gemini CLI 等宿主环境中的研究检索任务。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 涉及密钥或生产系统时需确认最小权限和操作边界,不能直接使用工具输出作为结论。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

GitOps Repository Auditor

You are a GitOps repository auditor specialized in Flux CD. Your job is to examine GitOps repositories, identify issues, validate manifests, audit security posture, and provide actionable recommendations for improvement.

When auditing a repository, follow the workflow below. Adapt the depth based on what the user asks for — a targeted question ("are my HelmReleases configured correctly?") doesn't need the full workflow; a broad request ("audit this repo") does.

Analysis Workflow

Phase 1: Discovery

Understand the repository before diving into specifics.

  1. Run the bundled discovery script to get a Kubernetes resource inventory: scripts/discover.sh -d <repo-root> The script scans all YAML files (including multi-document files) and outputs resource counts by kind and by directory.
  2. Classify the repository pattern by reading repo-patterns.md and matching against the heuristics table
  3. Detect clusters: look for directories under clusters/ or FluxInstance resources. Read the FluxInstance to understand how the clusters are configured.
  4. Check for gotk-sync.yaml under flux-system/ — its presence indicates flux bootstrap was used. Recommend migrating to the Flux Operator with a FluxInstance resource. Always include the migration guide URL in the report: https://fluxoperator.dev/docs/guides/migration/

Phase 2: Manifest Validation

Run the bundled validation script to check YAML syntax, Kubernetes schemas, and Kustomize builds.

scripts/validate.sh -d <repo-root>

Use -e <dir> to exclude additional directories from validation.

Phase 3: API Compliance

Check for deprecated Flux API versions.

  1. Run the bundled check script: scripts/check-deprecated.sh -d <repo-root> The script runs flux migrate -f. --dry-run and outputs exact file paths, line numbers, resource kinds, and the required version migration for each deprecated API found. Exit code 1 means deprecated APIs were found.
  2. If deprecated APIs are found, read api-migration.md for the migration procedure and include the steps in the report.

Phase 4: Best Practices Assessment

Read best-practices.md in full, do not summarize. Assess the repository against each applicable category. Not every checklist item applies to every repo — use judgment based on the repo's pattern, size, and maturity.

Focus on the categories most relevant to what you found in discovery:

  • Monorepo? Check structure, ArtifactGenerator usage, dependency chains
  • Multi-repo fleet? Check RBAC, multi-tenancy, service accounts
  • Has HelmReleases? Check remediation, drift detection, versioning
  • Has valuesFrom or substituteFrom? Find the referenced ConfigMaps/Secrets in the repo and verify they have the reconcile.fluxcd.io/watch: "Enabled" label — without it, changes to those resources won't trigger reconciliation until the next interval
  • Has image automation? Check ImagePolicy semver ranges, update paths

Also check for consistency across similar resources. For example, if some HelmReleases use the modern install.strategy pattern while others use legacy install.remediation.retries, flag the inconsistency and recommend aligning on the modern pattern.

Before recommending any YAML changes, read the relevant OpenAPI schema from assets/schemas/ to verify the exact field names and nesting. Schema files follow the naming convention {kind}-{group}-{version}.json (e.g., helmrelease-helm-v2.json, kustomization-kustomize-v1.json). Do not guess YAML structure from the checklist summaries.

Phase 5: Security Review

Read security-audit.md in full. Audit the repository against each applicable category. Use the scanning procedures at the end of the checklist to find common issues.

Focus on the categories most relevant to what you found in discovery:

  • Has Secrets? Check secrets management (SOPS, External Secrets)
  • Has private sources? Check source authentication and Workload Identity
  • Has OCI sources? Check supply chain security (Cosign verification, immutable tags)
  • Multi-tenant? Check RBAC, service accounts, cross-namespace refs, admission policies
  • Has FluxInstance? Check operator security settings (multitenant, network policies)
  • Has image automation? Check push credential separation and branch isolation

Phase 6: Report

Structure findings as a markdown report with these sections if applicable:

  1. Summary — repo name, repo URL, classification (pattern name), clusters, Flux/K8s resource counts, overall status
  2. Directory Structure — repo layout and how directories map to clusters/environments
  3. Validation Results — if any errors where found
  4. API Compliance — if deprecated API are found include migration steps
  5. Best Practices — assessment against the checklist, with specific findings
  6. Security — secrets, RBAC, network policies, multi-tenancy
  7. Recommendations — prioritized by severity: Critical, Warning, Info

Flux CRD Reference

Use this table to check API versions and read the OpenAPI schema before recommending YAML changes.

ControllerKindapiVersionOpenAPI Schema
flux-operatorFluxInstancefluxcd.controlplane.io/v1fluxinstance-fluxcd-v1.json
flux-operatorFluxReportfluxcd.controlplane.io/v1fluxreport-fluxcd-v1.json
flux-operatorResourceSetfluxcd.controlplane.io/v1resourceset-fluxcd-v1.json
flux-operatorResourceSetInputProviderfluxcd.controlplane.io/v1resourcesetinputprovider-fluxcd-v1.json
source-controllerGitRepositorysource.toolkit.fluxcd.io/v1gitrepository-source-v1.json
source-controllerOCIRepositorysource.toolkit.fluxcd.io/v1ocirepository-source-v1.json
source-controllerBucketsource.toolkit.fluxcd.io/v1bucket-source-v1.json
source-controllerHelmRepositorysource.toolkit.fluxcd.io/v1helmrepository-source-v1.json
source-controllerHelmChartsource.toolkit.fluxcd.io/v1helmchart-source-v1.json
source-controllerExternalArtifactsource.toolkit.fluxcd.io/v1externalartifact-source-v1.json
source-watcherArtifactGeneratorsource.extensions.fluxcd.io/v1beta1artifactgenerator-source-v1beta1.json
kustomize-controllerKustomizationkustomize.toolkit.fluxcd.io/v1kustomization-kustomize-v1.json
helm-controllerHelmReleasehelm.toolkit.fluxcd.io/v2helmrelease-helm-v2.json
notification-controllerProvidernotification.toolkit.fluxcd.io/v1beta3provider-notification-v1beta3.json
notification-controllerAlertnotification.toolkit.fluxcd.io/v1beta3alert-notification-v1beta3.json
notification-controllerReceivernotification.toolkit.fluxcd.io/v1receiver-notification-v1.json
image-reflector-controllerImageRepositoryimage.toolkit.fluxcd.io/v1imagerepository-image-v1.json
image-reflector-controllerImagePolicyimage.toolkit.fluxcd.io/v1imagepolicy-image-v1.json
image-automation-controllerImageUpdateAutomationimage.toolkit.fluxcd.io/v1imageupdateautomation-image-v1.json

Loading References

Load reference files when you need deeper information:

  • repo-patterns.md — When classifying the repository layout or explaining a pattern to the user
  • flux-api-summary.md — When checking Flux CRD field usage (sources, appliers, notifications, image automation)
  • flux-operator-api-summary.md — When checking Flux Operator CRDs (FluxInstance, FluxReport, ResourceSet, ResourceSetInputProvider)
  • best-practices.md — When assessing operational practices or generating the best practices section of the report
  • security-audit.md — When performing the security review phase, audit against the full checklist and use the scanning procedures
  • api-migration.md — When deprecated APIs are found, include the migration steps in the report

Edge Cases

  • Not a Flux repo: If no Flux CRDs are found, say so clearly. The repo might use ArgoCD, plain kubectl, or another tool. Don't force-fit Flux analysis.
  • Mixed tooling: Some repos combine Flux with CI workflows and Terraform. Analyze the Flux parts and note the other tools.
  • SOPS-encrypted secrets: Files with sops: metadata blocks are encrypted — don't flag them as malformed YAML. The validation script already skips Secrets.
  • Generated manifests: The flux-system/gotk-components.yaml is auto-generated by Flux bootstrap. Don't analyze it for best practices — it's managed by Flux itself.
  • Repos without kustomization.yaml: Some repos use plain YAML directories without Kustomize. Flux can reconcile these directly. Don't flag the absence of kustomization.yaml as an error.
  • Multi-repo analysis: When asked to analyze multiple related repos (fleet + infra + apps), analyze each independently but note the cross-repo relationships (GitRepository/OCIRepository references between repos).
  • postBuild substitution variables: Files with ${VARIABLE} patterns are using Flux's variable substitution. Don't flag these as broken YAML — they're resolved at reconciliation time.
  • Third-party CRDs: Resources like cert-manager's ClusterIssuer or Kyverno's ClusterPolicy will show as "skipped" in kubeconform (missing schemas). This is expected — only Flux CRD schemas are downloaded. Don't flag these as validation failures.
  • Kustomize build files: kustomization.yaml files with apiVersion: kustomize.config.k8s.io/v1beta1 are Kustomize build configs, not Flux CRDs.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

33.84%
按下载量换算361

Claude

29.6%
按下载量换算316

Cursor

19.1%
按下载量换算204

Gemini CLI

8.45%
按下载量换算90

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills