<!--
{
  "documentType" : "article",
  "framework" : "Security",
  "identifier" : "/documentation/Security/static-code-validation-flags",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Static Code Validation Flags"
}
-->

# Static Code Validation Flags

Use these supplemental flags to test the validity of a static code signature.

## Discussion

These flags supplement the flags described in [`SecCSFlags`](/documentation/Security/SecCSFlags). Use these additional constants with the flags parameter of the [`SecStaticCodeCheckValidity(_:_:_:)`](/documentation/Security/SecStaticCodeCheckValidity(_:_:_:)) and [`SecStaticCodeCheckValidityWithErrors(_:_:_:_:)`](/documentation/Security/SecStaticCodeCheckValidityWithErrors(_:_:_:_:)) functions to control the validation of code in the file system.

## Topics

### Constants

[`kSecCSCheckAllArchitectures`](/documentation/Security/kSecCSCheckAllArchitectures)

For multi-architecture (universal) Mach-O programs, validate all architectures included.

[`kSecCSDoNotValidateExecutable`](/documentation/Security/kSecCSDoNotValidateExecutable)

Do not validate the contents of the main executable.

[`kSecCSDoNotValidateResources`](/documentation/Security/kSecCSDoNotValidateResources)

Do not validate the presence and contents of all bundle resources (if any).

[`kSecCSBasicValidateOnly`](/documentation/Security/kSecCSBasicValidateOnly)

Do not validate either the main executable or the bundle resources, if any.

[`kSecCSCheckNestedCode`](/documentation/Security/kSecCSCheckNestedCode)

For code in bundle form, locate and recursively check embedded code.

[`kSecCSStrictValidate`](/documentation/Security/kSecCSStrictValidate)

Perform additional checks to ensure the validity of code in bundle form.

[`kSecCSFullReport`](/documentation/Security/kSecCSFullReport)

[`kSecCSCheckGatekeeperArchitectures`](/documentation/Security/kSecCSCheckGatekeeperArchitectures)

[`kSecCSRestrictSymlinks`](/documentation/Security/kSecCSRestrictSymlinks)

[`kSecCSRestrictToAppLike`](/documentation/Security/kSecCSRestrictToAppLike)

[`kSecCSRestrictSidebandData`](/documentation/Security/kSecCSRestrictSidebandData)

[`kSecCSUseSoftwareSigningCert`](/documentation/Security/kSecCSUseSoftwareSigningCert)

[`kSecCSValidatePEH`](/documentation/Security/kSecCSValidatePEH)

[`kSecCSSingleThreaded`](/documentation/Security/kSecCSSingleThreaded)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)