Sub topic 2
Licensing and Intellectual Property Questions
Assume you know basic Git, pull requests, code review, and CI. This chapter focuses on controls for team use of AI coding tools.
Licensing and intellectual property
AI output can resemble existing open-source code. Similarity does not always prove copying, but it creates a review question. Your policy should require developers to:
- Check important generated code for recognizable copied text.
- Follow the licenses of libraries and examples used in the change.
- Avoid pasting proprietary code into tools that do not provide suitable data protections.
- Ask legal or security specialists when ownership or license obligations are unclear.
Tool terms may address ownership, but they do not remove the team's responsibility to check dependencies and comply with licenses.
Approving and configuring tools
Approve tools through a security and legal review. Record which tools are allowed and what data each tool may receive. Configure retention, model-training, access, and audit settings where the provider supports them.
Give agentic tools the minimum permissions needed. A tool that edits files should not automatically receive production credentials, unrestricted network access, or permission to merge changes.
The author owns the change
The human author remains accountable for correctness, security, licensing, and maintainability. “The assistant generated it” is not a defense. The author must understand the submitted code, run the required checks, and be able to explain important design choices.
Reviewing AI-assisted pull requests
Use the same acceptance standard for every pull request. Reviewers should pay extra attention to assumptions that generated code can hide:
- Input validation, authorization, and error handling.
- Tests for normal, boundary, and failure cases.
- Dependency additions and their licenses.
- Secrets, personal data, and unsafe logging.
- Unnecessary complexity or code the author cannot explain.
AI assistance does not replace an independent reviewer. Required CI checks and branch protection should apply regardless of how the code was written.
Disclosing AI assistance
Follow a consistent team rule. Disclosure can record the tool, the scope of assistance, and whether the author reviewed and tested the result. Keep the record in the pull request so reviewers can ask focused questions without treating disclosure as evidence that the code is defective.
Exercise
A developer used an approved assistant to draft a payment-validation function. What must happen before merge?
Show answer
The developer must understand and test the function, check security and licensing concerns, disclose the assistance if required, and obtain normal review.