fuzzer

package
v1.12.1-lite6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
	return []interface{}{
		func(s *policy.PodDisruptionBudgetStatus, c fuzz.Continue) {
			c.FuzzNoCustom(s)
			s.PodDisruptionsAllowed = int32(c.Rand.Intn(2))
		},
		func(psp *policy.PodSecurityPolicySpec, c fuzz.Continue) {
			c.FuzzNoCustom(psp)

			runAsUserRules := []policy.RunAsUserStrategy{
				policy.RunAsUserStrategyMustRunAsNonRoot,
				policy.RunAsUserStrategyMustRunAs,
				policy.RunAsUserStrategyRunAsAny,
			}
			psp.RunAsUser.Rule = runAsUserRules[c.Rand.Intn(len(runAsUserRules))]

			seLinuxRules := []policy.SELinuxStrategy{
				policy.SELinuxStrategyMustRunAs,
				policy.SELinuxStrategyRunAsAny,
			}
			psp.SELinux.Rule = seLinuxRules[c.Rand.Intn(len(seLinuxRules))]

			supplementalGroupsRules := []policy.SupplementalGroupsStrategyType{
				policy.SupplementalGroupsStrategyRunAsAny,
				policy.SupplementalGroupsStrategyMustRunAs,
			}
			psp.SupplementalGroups.Rule = supplementalGroupsRules[c.Rand.Intn(len(supplementalGroupsRules))]

			fsGroupRules := []policy.FSGroupStrategyType{
				policy.FSGroupStrategyMustRunAs,
				policy.FSGroupStrategyRunAsAny,
			}
			psp.FSGroup.Rule = fsGroupRules[c.Rand.Intn(len(fsGroupRules))]
		},
	}
}

Funcs returns the fuzzer functions for the policy api group.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL