layout: page title: CPAN Author’s Secure Coding Guide description: A security guide for CPAN Distribution Authors toc: true —-

Document status: ⚠️ DRAFT

[!CAUTION] What you see here is a DRAFT of the CPAN Author's Security Guide by the CPAN Security Group (CPANSec). As long as this document is in DRAFT, all of the points and ideas below are open to revision, deletion or amending – by you!

Learn the basics

Keep your security metadata up-to-date

  • Read the CPAN::META::Spec and make sure all relevant fields are correct and up-to-date

Share your security metadata

Add security tests to your code

Practice symbol import discipline

Reduce the amount transitive dependencies

  • The more modules you depend on, the larger the attack surface you’ll have to defend.

Ensure you have trusted co-maintainers

  • Add a co-maintainer in PAUSE

Have a succession plan

  • Describe who among your co-maintainers will take over your project if you become unavailable

Select an appropriate Open Source license

  • Pick an OSI-approved Open Source license, and add it both to your project repo and other metadata.

Relevant documentation and guides

License and use of this document

You may use, modify and share this file under the terms of the CC-BY-SA-4.0 license.