Question 190
A reusable, audited authentication-coding standard is maintained in security/secure-auth.md. Several services need to reference it, and copying the text into each package CLAUDE.md has caused drift. What is the best configuration?
Explanation
Correct Answer
Claude Code supports importing another file from a CLAUDE.md instruction source, allowing services to refer to one maintained security standard. That reduces copied policy text and establishes a clear owner for future revisions. The team should ensure the imported path resolves for each service and that the rules are scoped appropriately. Imports load their content into context and are organizational, not automatic access-control enforcement; security-critical constraints should still be checked by tests and review gates.
Incorrect Answers
Independent copies would recreate the divergence the team wants to eliminate. It becomes unclear which service implements the reviewed standard. A central reference with explicit exceptions offers clearer provenance and maintenance. Central ownership permits review of changes before they propagate.
Authentication code may need requirements not applicable to every component. Removing a domain-specific reviewed document discards important guidance. It can remain specialized while being shared through a reliable reference mechanism. Different threat models warrant explicit and reviewable specialized practices. This standard remains important.
Credentials and policy documents serve different purposes. A token value should not carry instruction text and may be exposed if treated as model context. Use readable, version-controlled documentation with correct scope instead. The team must not expose credentials in instructions.