Skip to content

Compliance & Security Scanning

Anjungan provides three types of security scanning for managed servers.

1. CIS Benchmark Checks

Checks are organized by category, mapped to CIS (Center for Internet Security) benchmarks:

CategoryCoverageExample Checks
kernelKernel securitykernel.kptr_restrict, randomize_va_space, dmesg_restrict
networkNetwork securityReverse path filtering, IPv4 forwarding, ICMP redirects, SYN cookies
usersUser/group securityEmpty password check, root UID, sudoers config
sshSSH hardeningRoot login disabled, protocol 2, key auth
filesystemFile system security/tmp noexec/nodev, sticky bit, SUID audit
servicesService hardeningUnnecessary services disabled
loggingAudit & loggingAuditd running, rsyslog, log permissions
dockerDocker daemon securityTLS verification, live-restore, user namespace remap

Available Profiles

ProfileQuery ParamScope
All Checksprofile=all (default)Full audit of all 8+ categories
CIS Level 1profile=cis_level_1CIS Level 1 recommendations
CIS Level 2profile=cis_level_2CIS Level 1 + 2 recommendations
CIS Dockerprofile=cis_dockerDocker daemon security only

2. Lynis Audit

Lynis is an open-source security auditing tool. Anjungan runs Lynis remotely via SSH and parses the results.

Output includes:

  • Hardening score (0–100) — overall security posture
  • Warnings — critical issues requiring attention
  • Suggestions — configuration improvements
  • Category breakdown — per-area test results

3. Container Image Scanning

Container images on managed servers can be scanned for vulnerabilities using Trivy.

  • Per-container and bulk scanning
  • Results stored per scan with findings history

Scoring System

Each scan produces a compliance score (0–100):

StatusScore
✅ Compliant (green)≥ 90 (configurable)
⚠️ Warning (yellow)70–89 (configurable)
🔴 Critical (red)< 70 (configurable)

Configuring Thresholds

Thresholds are dynamic and stored in the database:

bash
# Get current thresholds
curl -H "Authorization: Bearer ***" \
  https://your-instance/api/v1/settings/compliance-thresholds

# Update thresholds
curl -X PUT -H "Authorization: Bearer ***" \
  -H "Content-Type: application/json" \
  -d '{"compliant": 90, "warning": 70}' \
  https://your-instance/api/v1/settings/compliance-thresholds

Validation: compliant must be > warning > 0. Changes take effect immediately.

Scan Lifecycle

  1. Trigger — scan request returns immediately with scan_id + status: "running"
  2. Background execution — scan runs asynchronously via SSH
  3. Completion — status updates to completed, score and findings saved
  4. Viewing — poll compliance/{serverID}/latest or view scan history

Dashboard UI

The compliance dashboard shows:

  • Overview — aggregated compliance scores across all servers
  • Server-level cards — score, scan type, last scan time
  • Detail page — full finding list by category, remediation guidance
  • History — scan history per server with trend tracking