Skip to main content
skill CX Codex

cis-benchmarks — Claude Code skill: what it does, how to install

Audits systems against CIS benchmarks and helps remediate security violations. Useful for applying hardening baselines to Linux servers or Kubernetes nodes.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add BagelHole/DevOps-Security-Agent-Skills --skill cis-benchmarks -a claude-code
Open on GitHub

What cis-benchmarks does

The skill guides an agent through a four-stage security cycle: scan, analyze, remediate, and validate. It provides assessment commands for OpenSCAP and Lynis, InSpec test examples for SSH hardening, and Docker commands to run kube-bench.

Auditing requires the underlying tools to be present on the target host. Running OpenSCAP demands openscap-scanner and scap-security-guide, while Kubernetes checks rely on the aquasec/kube-bench:latest container image. If the scanner packages are missing, the assessment fails immediately. That makes server preparation a required first step.

The workflow prioritizes baseline reporting before applying any changes. It enforces documenting exceptions and verifying fixes, which prevents accidental lockouts during SSH daemon hardening.

What it helps with

  • audit Linux systems against CIS profiles using OpenSCAP or Lynis
  • run compliance checks on Kubernetes nodes with kube-bench
  • write InSpec controls to verify SSH settings like PermitRootLogin
  • organize a remediation workflow with baseline reports and documented exceptions

Example prompts for the agent

  • Run a CIS benchmark scan on this Ubuntu host using OpenSCAP
  • Audit my Kubernetes worker nodes with kube-bench
  • Create InSpec controls to enforce SSH hardening rules

How to install cis-benchmarks

1Skills CLI (Vercel)

npx skills add BagelHole/DevOps-Security-Agent-Skills --skill cis-benchmarks -a claude-code

2Manually: put the files in place

~/.claude/skills/cis-benchmarks/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/cis-benchmarks/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about cis-benchmarks

How to install cis-benchmarks in Claude Code?

Run npx skills add BagelHole/DevOps-Security-Agent-Skills --skill cis-benchmarks -a claude-code. This downloads the skill into your Claude Code environment.

What does cis-benchmarks do?

It provides structured procedures and commands to audit systems against CIS standards, inspect findings, and apply hardening fixes.

Which tools are required to run the assessments?

You need scanner packages like openscap-scanner or lynis installed on the host, or Docker to execute the aquasec/kube-bench:latest container.

Source text

SKILL.md · MIT
---
name: cis-benchmarks
description: Audit and remediate CIS benchmark violations. Use automated tools to assess compliance and implement hardening recommendations. Use when meeting compliance requirements or implementing security baselines.
license: MIT
metadata:
  author: devops-skills
  version: "1.0"
---

# CIS Benchmarks

Implement and audit CIS security benchmarks.

## When to Use This Skill

Use this skill when:
- Assessing security compliance
- Implementing security baselines
- Meeting regulatory requirements
- Hardening systems to standards

## Assessment Tools

### OpenSCAP

```bash
# Install
apt install openscap-scanner scap-security-guide

# Run CIS benchmark scan
oscap xccdf eval \
  --profile xccdf_org.ssgproject.content_profile_cis \
  --results results.xml \
  --report report.html \
  /usr/share/xml/scap/ssg/content/ssg-ubuntu2204-ds.xml
```

### Lynis

```bash
# Install
apt install lynis

# Run audit
lynis audit system

# Generate report
lynis audit system --report-file /tmp/lynis-report.dat
```

### InSpec

```ruby
# cis-profile/controls/ssh.rb
control 'cis-ssh-1' do
  impact 1.0
  title 'Ensure SSH root login is disabled'
  
  describe sshd_config do
    its('PermitRootLogin') { should eq 'no' }
  end
end

control 'cis-ssh-2' do
  impact 0.7
  title 'Ensure SSH password authentication is disabled'
  
  describe sshd_config do
    its('PasswordAuthentication') { should eq 'no' }
  end
end
```

```bash
# Run InSpec
inspec exec cis-profile -t ssh://user@target
```

### Kubernetes CIS

```bash
# kube-bench
docker run --rm -v /etc:/etc:ro -v /var:/var:ro \
  aquasec/kube-bench:latest run --targets node

# Check specific sections
kube-bench run --targets master --check 1.1,1.2
```

## Remediation Workflow

```yaml
workflow:
  1_scan:
    - Run automated assessment
    - Generate baseline report
    
  2_analyze:
    - Review findings
    - Identify false positives
    - Prioritize by risk
    
  3_remediate:
    - Apply fixes
    - Document exceptions
    - Verify changes
    
  4_validate:
    - Re-run assessment
    - Confirm remediation
    - Generate compliance report
```

## Best Practices

- Baseline before hardening
- Document exceptions
- Automate assessments
- Track compliance over time
- Regular re-assessment
- Version control configurations

## Related Skills

- [linux-hardening](../linux-hardening/) - Linux security
- [vulnerability-scanning](../../scanning/vulnerability-scanning/) - Security scanning

© devops-skills · MIT · BagelHole/DevOps-Security-Agent-Skills

Similar skills

Everything for Security →

From the same set127

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor