|
| 1 | +# Environment Dependencies Policy |
| 2 | + |
| 3 | +## Purpose |
| 4 | + |
| 5 | +This policy establishes guidelines for managing third-party packages in the HAMi repository. Its goal is to ensure that all dependencies are secure, up-to-date, and necessary for the project’s functionality. |
| 6 | + |
| 7 | +## Scope |
| 8 | + |
| 9 | +This policy applies to all maintainers of the HAMi repository and governs all third-party packages incorporated into the project. |
| 10 | + |
| 11 | +## Policy |
| 12 | + |
| 13 | +Maintainers must adhere to the following when incorporating third-party packages: |
| 14 | + |
| 15 | +- **Necessity:** Include only those packages that are essential to the project’s functionality. |
| 16 | +- **Latest Stable Versions:** Use the latest stable releases whenever possible. |
| 17 | +- **Security:** Avoid packages with known security vulnerabilities. |
| 18 | +- **Version Pinning:** Lock all dependencies to specific versions to maintain consistency. |
| 19 | +- **Dependency Management:** Utilize an appropriate dependency management tool (e.g., Go modules, npm, pip) to handle third-party packages. |
| 20 | +- **Testing:** Ensure that any new dependency passes all automated tests before integration. |
| 21 | + |
| 22 | +## Procedure |
| 23 | + |
| 24 | +When adding a new third-party package, maintainers should: |
| 25 | + |
| 26 | +1. **Assess Need:** Determine whether the package is truly necessary for the project. |
| 27 | +2. **Conduct Research:** Review the package’s maintenance status and reputation within the community. |
| 28 | +3. **Select Version:** Opt for the latest stable version that meets the project’s requirements. |
| 29 | +4. **Pin the Version:** Explicitly pin the dependency to the chosen version within the repository. |
| 30 | +5. **Update Documentation:** Revise the project documentation to include details about the new dependency. |
| 31 | + |
| 32 | +## Archive/Deprecation |
| 33 | + |
| 34 | +If a third-party package becomes deprecated or discontinued, maintainers must promptly identify and integrate a suitable alternative while updating the documentation accordingly. |
| 35 | + |
| 36 | +## Enforcement |
| 37 | + |
| 38 | +Compliance with this policy is monitored by the HAMi maintainers. All dependency-related changes are subject to peer review to ensure adherence to these guidelines. |
| 39 | + |
| 40 | +## Exceptions |
| 41 | + |
| 42 | +Exceptions to this policy may be granted by the HAMi project lead on a case-by-case basis. Any exceptions must be documented with a clear rationale. |
| 43 | + |
| 44 | +## Credits |
| 45 | + |
| 46 | +This policy has been adapted and optimized based on guidelines from the [Kubescape Community](https://github.com/kubescape/kubescape/blob/master/docs/environment-dependencies-policy.md). |
0 commit comments