Files
DeepTutor/.github/pull_request_template.md
Scarlet Moore a0433d784e Feature/pre commit ci (#37)
* feat: add comprehensive pre-commit CI hooks

- Add safety for dependency vulnerability scanning
- Add bandit for Python security linting with appropriate skips
- Add interrogate for docstring coverage checking (60% threshold)
- Add mypy for type checking with permissive CI configuration
- Update requirements.txt with safety and bandit dependencies
- Configure all tools for CI compatibility (non-blocking for initial setup)

* security: add hardening measures based on upstream issues

- Add .gitattributes rules to force LF line endings for critical files (fixes CRLF security issues)
- Enhance document validator with MIME type validation and stricter PDF size limits
- Fix subprocess security issues by adding shell=False to prevent command injection
- Add resource exhaustion protection with separate PDF size limits (50MB vs 100MB general limit)

Addresses upstream issues:
- #97: Cross-platform deployment failures due to CRLF line endings
- #31: Large PDF processing failures and resource exhaustion
- Security hardening for subprocess calls to prevent injection attacks

* docs: streamline contribution process and pre-commit checks

- Update and format CONTRIBUTING.md for clarity

- Simplify pull request template

- Adjust pre-commit config to be more lenient locally

* chore: update .gitignore, .secrets.baseline, pyproject.toml, and requirements.txt for improved configuration and dependency management
2026-01-14 13:57:18 +11:00

35 lines
1.1 KiB
Markdown

<!--
Thank you for contributing to DeepTutor! 🚀
Please ensure your PR is ready for review and follows our contribution guidelines.
For more details, see our [CONTRIBUTING.md](https://github.com/HKUDS/DeepTutor/blob/dev/CONTRIBUTING.md).
-->
### Description
*A clear and concise description of the changes.*
### Related Issues
- Closes #...
- Related to #...
### Module(s) Affected
- [ ] `agents`
- [ ] `api`
- [ ] `cli`
- [ ] `config`
- [ ] `core`
- [ ] `knowledge`
- [ ] `services`
- [ ] `web` (Frontend)
- [ ] `docs` (Documentation)
- [ ] Other: `...`
### Checklist
- [ ] I have read and followed the [contribution guidelines](https://github.com/HKUDS/DeepTutor/blob/dev/CONTRIBUTING.md).
- [ ] My code follows the project's coding standards.
- [ ] I have run `pre-commit run --all-files` and fixed any issues.
- [ ] I have added relevant tests for my changes.
- [ ] I have updated the documentation (if necessary).
- [ ] My changes do not introduce any new security vulnerabilities.
### Additional Notes
*Add any other context or screenshots about the pull request here.*