Skip to content
Back to skills

Cicd Base

ASecurity

Shared CI/CD — stages, quality gates, secret management, rollback.

  • 6 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 5, 2026
ai-agentsdockergitci/cdsecurity

Security analysis

A100/100

Scanned September 5, 2026

npx -y skills add Dev-Toolbelt/dev-team-agents --skill cicd-base --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cicd Base?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cicd Base
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dev-toolbelt-cicd-base/badge)](https://www.skillsdirectory.com/skills/dev-toolbelt-cicd-base)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cicd-base
description: Shared CI/CD — stages, quality gates, secret management, rollback.
---

## Standard Pipeline Stages

Stages run in this order. Each stage must pass before the next begins.

| # | Stage | Purpose | Fails on |
|---|-------|---------|----------|
| 1 | `lint` | Code style and static analysis | Any lint error |
| 2 | `test` | Unit + integration tests with coverage report | Test failure or coverage below threshold |
| 3 | `security-scan` | SAST + dependency vulnerability check (OWASP) | HIGH or CRITICAL findings |
| 4 | `build` | Compile / bundle / containerize | Build error |
| 5 | `publish` | Push artifact/image to registry | Registry error — runs only on `main`/release branches |
| 6 | `deploy-staging` | Deploy to staging environment | Deploy failure — auto, after publish |
| 7 | `smoke-test` | Automated smoke tests against staging | Any smoke test failure |
| 8 | `deploy-prod` | Deploy to production | Manual gate, or auto on semver tag |

> Platform-specific skills (`cicd-github`, `cicd-gitlab`, `cicd-bitbucket`, `cicd-jenkins`) map these stages to their native primitives. This file defines the intent — the platform skill defines the syntax.

---

## Quality Gate Pattern

- All stages 1–4 must pass before any deploy stage (`publish`, `deploy-staging`, `deploy-prod`) runs
- **Coverage threshold**: default ≥ 80% line coverage; blocks on failure
- **Security threshold**: `HIGH` or `CRITICAL` severity findings block the pipeline; `MEDIUM`/`LOW` produce warnings only
- Never deploy from a branch that has failing checks

---

## Secret Management

- Never hardcode secrets in pipeline config files — treat the pipeline config as public
- Use the platform's native secret store:
  - GitHub Actions → Repository/Organization Secrets
  - GitLab CI → CI/CD Variables (masked + protected)
  - Bitbucket Pipelines → Repository/Deployment Variables
  - Jenkins → Credentials Store (with the Credentials Binding plugin)
- Rotate secrets on a defined schedule (quarterly minimum)
- Revoke secrets immediately on team member offboarding
- Reference secrets by name only in config; never echo or log their values

---

## Artifact Strategy

| Rule | Detail |
|------|--------|
| **Tagging** | Tag images with git SHA for every build; add semver tag when on a release branch |
| **Retention** | Keep last 10 builds; prune older artifacts automatically |
| **Immutability** | Never redeploy a mutable `latest` tag to production — always use a pinned SHA or semver |
| **Registry** | Push to a private registry; do not rely on Docker Hub for production images |

---

## Rollback

- Every `deploy-staging` and `deploy-prod` stage must have a documented rollback step
- Prefer **blue/green** or **canary** over in-place deploys for zero-downtime rollback capability
- Rollback triggers:
  - Smoke tests fail after staging deploy → auto-rollback to previous artifact
  - Manual trigger by on-call engineer for production
- Store the last successful artifact reference so rollback does not require a rebuild

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.