Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
79d020c
Add design spec for conditional init() execution in busybox binary
janisz Apr 13, 2026
ce0bf8d
Add implementation plan for conditional init() execution
janisz Apr 13, 2026
99f16b5
feat: create central/app package structure
janisz Apr 13, 2026
391316f
docs: analyze sensor → central import chains
janisz Apr 13, 2026
6834046
feat: establish app/ structure for config-controller
janisz Apr 13, 2026
29b615f
fix: move admission-control init() to explicit initialization
janisz Apr 13, 2026
2cf4237
refactor: add GraphQL loader init structure (stub)
janisz Apr 13, 2026
2af5b79
refactor: add compliance init structure (stub)
janisz Apr 13, 2026
eb3f1e0
refactor: move Central metrics from init() to explicit registration
janisz Apr 13, 2026
bdfdc77
refactor: move sensor metrics init() to explicit initialization
janisz Apr 13, 2026
2287e20
docs: add verification report and architecture guide
janisz Apr 13, 2026
0449ea6
docs: Phase 5 low-hanging fruit analysis and migration plan
janisz Apr 13, 2026
8b5a49f
docs: add busybox-scoped Phase 5 recommendations
janisz Apr 13, 2026
eca4ef0
docs: add heap profile component labeling fix
janisz Apr 13, 2026
d3de83e
feat: add component labeling for heap/CPU profiles
janisz Apr 13, 2026
987c76a
docs: update heap profile labeling doc with implementation details
janisz Apr 13, 2026
82a6968
refactor: minimize metrics init diff by keeping logic in metrics pack…
janisz Apr 13, 2026
c78f077
chore: remove documentation files
janisz Apr 13, 2026
93f7842
refactor: remove app/init.go files, call metrics.Init directly from a…
janisz Apr 13, 2026
db6b9d5
fix: update metric Init() comments to reference app.go
janisz Apr 13, 2026
f1a6ada
refactor: migrate GraphQL loaders and compliance checks to explicit I…
janisz Apr 13, 2026
6744213
refactor: rename init() to register*() in kubernetes compliance checks
janisz Apr 13, 2026
9b30c56
refactor: rename init() to Register*() in hipaa_164 compliance checks
janisz Apr 13, 2026
f24eb46
refactor: rename init() to Register*() in nist80053 compliance checks
janisz Apr 13, 2026
668c7ef
refactor: rename init() to Register*() in nist800-190 compliance checks
janisz Apr 13, 2026
0a704c0
refactor: rename init() to Register*() in pcidss32 compliance checks
janisz Apr 13, 2026
b84cb73
refactor: replace blank imports with explicit Init() calls in complia…
janisz Apr 13, 2026
3b1086c
refactor: rename init() to Register*() in central hipaa_164 complianc…
janisz Apr 13, 2026
530b499
refactor: rename init() to Register*() in central nist800-190 complia…
janisz Apr 13, 2026
f487fd3
refactor: rename init() to Register*() in central nist80053 complianc…
janisz Apr 13, 2026
4e8afdd
refactor: rename init() to Register*() in central pcidss32 compliance…
janisz Apr 13, 2026
f8083d4
refactor: rename init() to Init() in central remote compliance checks
janisz Apr 13, 2026
4c0dbf7
refactor: replace blank imports with explicit Init() in central compl…
janisz Apr 13, 2026
998006c
refactor: rename init() to Register*() in all notifier factories
janisz Apr 13, 2026
3ab5d12
refactor: rename init() to Register*() in compliance standards metadata
janisz Apr 13, 2026
5dfcdc9
refactor: rename init() to Register*() in external backup plugins
janisz Apr 13, 2026
26ed417
refactor: migrate init() to explicit Init() pattern and centralize pr…
janisz Apr 14, 2026
e9f029f
fix: break import cycle in sensor telemetry gatherers
janisz Apr 14, 2026
4eb3d12
fix: resolve golangci-lint failures from init() migration
janisz Apr 14, 2026
51425e9
fix: expand gochecknoinits exclusion to cover all legacy directories
janisz Apr 14, 2026
441a472
refactor: migrate init() to explicit Init() pattern across all compon…
janisz Apr 14, 2026
d62a670
refactor: migrate init() to explicit Init() in roxctl, sensor, tools,…
janisz Apr 14, 2026
a7c0386
style: fix gofmt formatting in volume converter files
janisz Apr 14, 2026
0d397c9
config: add pkg/images/enricher/metadata.go to gochecknoinits exclusion
janisz Apr 14, 2026
0cb5d2a
refactor: migrate migrator init() to explicit Register() pattern
janisz Apr 14, 2026
6fceb99
refactor: migrate remaining 9 pkg/ init() functions to explicit Init()
janisz Apr 14, 2026
dd31084
refactor: unexport centralRun - only used within main package
janisz Apr 14, 2026
aeee0e4
fix: apply critical fixes from split PRs to main branch
janisz Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: rename init() to Register*() in central nist80053 complianc…
…e checks

Renamed all package-level init() functions to explicit Register*() functions
in 20 central nist80053 compliance check files. Created init.go to call all
register functions explicitly. Deleted all.go with blank imports.

This prevents automatic execution for all components in the busybox binary.
Central compliance checks now only run when explicitly initialized via
centralChecks.Init() in central/app/app.go.

Files changed:
- 20 check files: init() → Register*() (e.g., check_ac_14: RegisterAC14())
- init.go: created to call all 20 Register*() functions
- all.go: deleted (blank imports no longer needed)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
  • Loading branch information
janisz and claude committed Apr 13, 2026
commit f487fd355082e89b1e95d35ba000b02a7971f2b8
25 changes: 0 additions & 25 deletions central/compliance/checks/nist80053/all.go

This file was deleted.

2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_ac_14/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func checkNoExtraPrivilegesForUnauthenticated(ctx framework.ComplianceContext) {
}
}

func init() {
func RegisterAC14() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_ca_9/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const (
interpretationText = common.CheckNetworkPoliciesByDeploymentInterpretation
)

func init() {
func RegisterCA9() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_cm_11/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func checkAllDefaultRuntimePackageManagementPoliciesEnabled(ctx framework.Compli
}
}

func init() {
func RegisterCM11() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_cm_2/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var (
For this control, ` + common.AnyPolicyInLifeCycleInterpretation(phase)
)

func init() {
func RegisterCM2() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_cm_3/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var (
For this control, ` + common.AnyPolicyInLifecycleStageEnforcedInterpretation(phase)
)

func init() {
func RegisterCM3() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_cm_5/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
` + common.LimitedUsersAndGroupsWithClusterAdminInterpretation
)

func init() {
func RegisterCM5() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_cm_6/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For this control, ` + common.CheckNoViolationsForDeployPhasePoliciesInterpretati
To approve a deviation, resolve the policy violation or adjust the scope or exclusions for the policy.`
)

func init() {
func RegisterCM6() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_cm_7/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For this control, StackRox validates that at least one policy is enabled and enf
2) runtime behavior.`
)

func init() {
func RegisterCM7() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_cm_8/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const (
For this control, ` + common.AllDeployedImagesHaveMatchingIntegrationsInterpretation
)

func init() {
func RegisterCM8() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_ir_4_5/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var (
For this control, ` + common.AnyPolicyInLifecycleStageEnforcedInterpretation(phase)
)

func init() {
func RegisterIR45() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_ir_5/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var (
For this control, ` + common.AnyPolicyInLifeCycleInterpretation(phase)
)

func init() {
func RegisterIR5() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_ir_6_1/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
For this control, StackRox checks that at least one runtime policy is set to notify at least one workflow tool.`
)

func init() {
func RegisterIR61() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_ra_3/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const (
For this control, StackRox checks that StackRox components are installed in each cluster, providing continuous multi-factor risk assessment.`
)

func init() {
func RegisterRA3() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_ra_5/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func checkNoUnresolvedAlertsForPolicies(ctx framework.ComplianceContext, policyI
}
}

func init() {
func RegisterRA5() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_sa_10/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var (
For this control, ` + common.AnyPolicyInLifeCycleInterpretation(phase)
)

func init() {
func RegisterSA10() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_sc_6/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
For this control, StackRox checks that at least one policy requiring CPU limits and memory limits is enabled and enforced.`
)

func init() {
func RegisterSC6() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_sc_7/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const (
interpretationText = common.CheckNetworkPoliciesByDeploymentInterpretation
)

func init() {
func RegisterSC7() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_si_2_2/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For this control, ` + common.AllDeployedImagesHaveMatchingIntegrationsInterpreta
Also, ` + common.CheckAtLeastOnePolicyEnabledReferringToVulnsInterpretation
)

func init() {
func RegisterSI22() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_si_3_8/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var (
For this control, ` + common.AnyPolicyInLifeCycleInterpretation(phase)
)

func init() {
func RegisterSI38() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
2 changes: 1 addition & 1 deletion central/compliance/checks/nist80053/check_si_4/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func checkClusterCheckedInInThePastHour(ctx framework.ComplianceContext) {
}
}

func init() {
func RegisterSI4() {
framework.MustRegisterNewCheck(
framework.CheckMetadata{
ID: controlID,
Expand Down
49 changes: 49 additions & 0 deletions central/compliance/checks/nist80053/init.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package nist80053

import (
checkac14 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_ac_14"
checkca9 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_ca_9"
checkcm11 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_cm_11"
checkcm2 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_cm_2"
checkcm3 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_cm_3"
checkcm5 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_cm_5"
checkcm6 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_cm_6"
checkcm7 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_cm_7"
checkcm8 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_cm_8"
checkir45 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_ir_4_5"
checkir5 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_ir_5"
checkir61 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_ir_6_1"
checkra3 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_ra_3"
checkra5 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_ra_5"
checksa10 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_sa_10"
checksc6 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_sc_6"
checksc7 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_sc_7"
checksi22 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_si_2_2"
checksi38 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_si_3_8"
checksi4 "github.com/stackrox/rox/central/compliance/checks/nist80053/check_si_4"
)

// Init registers all central NIST 800-53 compliance checks.
// Called explicitly from central/compliance/checks/all.go instead of package init().
func Init() {
checkac14.RegisterAC14()
checkca9.RegisterCA9()
checkcm11.RegisterCM11()
checkcm2.RegisterCM2()
checkcm3.RegisterCM3()
checkcm5.RegisterCM5()
checkcm6.RegisterCM6()
checkcm7.RegisterCM7()
checkcm8.RegisterCM8()
checkir45.RegisterIR45()
checkir5.RegisterIR5()
checkir61.RegisterIR61()
checkra3.RegisterRA3()
checkra5.RegisterRA5()
checksa10.RegisterSA10()
checksc6.RegisterSC6()
checksc7.RegisterSC7()
checksi22.RegisterSI22()
checksi38.RegisterSI38()
checksi4.RegisterSI4()
}