AI-generated Key Takeaways
-
Code Compliance is currently in Public Preview and is used through the Checks CLI.
-
Code Compliance scans your codebase to understand how sensitive data is collected, shared, or processed.
-
Code Compliance does not store your codebase on Google servers, but can store short code snippets related to findings if enabled.
-
You can scan your repository using the
checks code scancommand and output results in text, JSON, or HTML format. -
Automated scans and support are available for Checks Code Compliance.
Code Compliance is used through the Checks CLI and results are uploaded to the Checks Console.
Install Code Compliance
To get started, follow the installation instructions for the Checks CLI.
Once installed, you'll be able to run Code Compliance commands:
checks code <command>Scan your project
After installing Checks Code Compliance, you can scan your codebase to understand how sensitive data is collected, shared, or processed.
To scan your repository code using the Code Compliance CLI, use the
checks code scan command.
For example, to test the my-swift-app repository that's in the folder
repositories/personal:
checks code scan repositories/personal/my-swift-appBy default, Code Compliance will output results to a text format in the terminal.
Output test results in JSON format
To export the results to a JSON format in the terminal:
checks code scan PATH --format=json > ./checks-code-resultsTo export the results to a JSON format and save to a local file:
checks code scan PATH --format=json > ./checks-code-results.json
Output test results in HTML format
To export the results to a HTML format in the terminal:
checks code scan PATH --format=html > ./checks-code-resultsTo export the results to a HTML format and save to a local file:
checks code scan PATH --format=html > ./checks-code-results.html
Additional help
Run checks code scan --help.
Set up automated scans
See our CI/CD Overview documentation for setting up automated Code Compliance scans.
Getting support
Send an email to checks-support@google.com whenever you need help with Checks Code Compliance, or Checks in general.