-
Notifications
You must be signed in to change notification settings - Fork 41
build: harden Docker, expand CI coverage, add linting, pin verapdf; fix version script path #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
build: harden Docker, expand CI coverage, add linting, pin verapdf; fix version script path #110
Conversation
- Add Docker security best practices by running as non-root user - Implement linting configurations for Java, Python, and Node projects - Extend CI workflow to include coverage for Node and Python - Add Maven checkstyle and spotbugs plugins for Java projects - Update version management script to handle setup.py
Update from eclipse-temurin:11-jre to 17-jre-alpine with pinned SHA for security. Replace groupadd/useradd with Alpine-compatible addgroup/adduser commands.
hnc-leebd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thanks a lot for your contribution. really appreciate it!
I fully agree with the direction and improvements you're proposing.
When you have a moment, could you please take a look at the build and test errors and fix them?
Once those are resolved, we should be good to move forward.
Thanks again!
- Update verapdf version range in pom.xml - Improve Dockerfile permissions handling - Add version file sync step in release workflow - Simplify version updates in build steps - Enhance coverage workflow with matrix testing - Add ESLint and typechecking to Node.js coverage job - Update pnpm-lock.yaml with new dependencies
Add OpenContainer image labels for better metadata and specify user group explicitly
…opendataloader-pdf into pr/hardening-ci-linting
Ensure proper cleanup of static resources and containers after PDF processing to prevent memory leaks and allow sequential processing of multiple files. Added integration test to verify resource cleanup behavior.
Add escapeHtmlText method to properly escape HTML special characters in generated output. This prevents potential XSS vulnerabilities when rendering user-provided content. The method handles &, <, >, ", ', and / characters, replacing them with their HTML entity equivalents. Also includes a test case to verify proper escaping of script tags in heading text.
Add escapeMarkdownText method to properly handle special characters in markdown generation, preventing potential XSS and formatting issues. The method replaces characters like <, >, &, and markdown syntax characters with their escaped equivalents.
|
XSS hardening for HTML and Markdown outputs and ensures robust resource cleanup after each PDF processed. Key Changes
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Changes
eclipse-temurin:17-jre-alpinepinned by digest for reproducibility (java/opendataloader-pdf-cli/Dockerfile:1).lintandlint:fixscripts (node/opendataloader-pdf/package.json:18–23), config at node/opendataloader-pdf/.eslintrc.json:1.build-scripts/set_version.pyto updatepython/opendataloader-pdf/setup.pyusing correct path and regex (build-scripts/set_version.py:7,19–25,33–43,45).Rationale
Compatibility
Security
Breaking Changes
Testing
Documentation
Checklist