Skip to content

Implement Profiles / Policy Packs Feature #12

Description

@chetanr25

Problem

Currently users have to either apply all rules (syshardn apply --level moderate) or manually specify individual rule IDs (--rules LNX-001 --rules LNX-002). This works but doesn't fit different environments well:

  • Web servers need SSH hardening but not desktop services
  • Workstations need screensaver locks but may keep USB storage
  • PCI-DSS compliance needs specific controls, not all CIS rules
  • Minimal server images need just kernel/filesystem rules

Manually building rule lists for each scenario is tedious and hard to share.

Solution

Add support for "profiles" - named bundles of rules that can be applied with a single command:

# Instead of listing 15 rule IDs...
syshardn apply --profile cis-level1-server

# Or combine multiple profiles
syshardn apply --profile web-server --profile pci-compliance

Implementation (v1 Scope)

From our discussion in #10, focus on core functionality:

Storage: Profiles stored as YAML in ~/.syshardn/profiles/

Creation Methods:

  1. Direct YAML editing (for power users)
  2. Simple CLI commands for quick setup

CLI Commands:

syshardn profile list                        
syshardn profile show cis-level1-server      
syshardn profile copy cis-level1-server my-server 
syshardn profile create my-profile --include "LNX-2*" --exclude LNX-602

Profile YAML Format

Need to document a clear template showing how to structure profile YAML files.

Integration Points

  • syshardn check --profile name (check compliance against profile)
  • syshardn apply --profile name (apply rules from profile)
  • Profile resolution should work with existing --rules, --level, --category flags

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions