Documentation
¶
Overview ¶
Package commands — security.go
`nself security` provides server-level security operations: audit, setup, and status. These commands inspect the host environment (firewall, fail2ban, SSH config) and the running stack for common hardening gaps. They are intentionally non-destructive by default — `setup` requires `--apply` to make changes, otherwise it prints what would be done.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "nself", Short: "nSelf CLI - Serverless hosting, anywhere", Long: `nSelf CLI empowers you to deploy a fully-featured, production-ready backend to any hosting provider with absolute simplicity. The Golden Path: nself init # Generate your pristine .env configuration nself build # Compose your infrastructure nself start # Boot your stack`, RunE: func(cmd *cobra.Command, args []string) error { return cmd.Help() }, SilenceUsage: true, SilenceErrors: true, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
type LogSummary ¶
type LogSummary struct {
Service string
TotalLines int
ErrorCount int
WarnCount int
TopErrors []string // up to 5 most frequent error messages (deduped)
LastLine string
}
LogSummary holds per-service log analysis results.
func CollectLogSummary ¶
func CollectLogSummary(ctx context.Context, workdir string, service string, maxLines int) (*LogSummary, error)
CollectLogSummary fetches and analyses recent logs for a single service.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.