Skip to main content
The Protected Material for Code feature provides a comprehensive solution for identifying AI outputs that match code from existing GitHub repositories. This feature allows you to use code generation models confidently, in a way that enhances transparency to end users and promotes compliance with organizational policies.
The Content Safety service’s code scanner/indexer is only current through April 6, 2023. Code that was added to GitHub after this date won’t be detected. Use your own discretion when using Protected Material for Code to detect recent bodies of code.
The key objectives of the Protected Material Detection for Code feature for AI-generated code are:
  • To detect and prevent the display of protected code generated by AI models.
  • To enable organizations to manage risks associated with AI-generated code.
  • To ensure that AI-generated code complies with legal, ethical, and organizational policy standards.
For more information about protected material detection, see the Protected material detection concept page. For API input limits, see the Input requirements section of the Overview.