Skip to content

fix(security): Replace custom HTML escape with stdlib html.escape()#61

Open
universe7creator wants to merge 1 commit intodocksec-security:mainfrom
universe7creator:fix/html-escape-stdlib
Open

fix(security): Replace custom HTML escape with stdlib html.escape()#61
universe7creator wants to merge 1 commit intodocksec-security:mainfrom
universe7creator:fix/html-escape-stdlib

Conversation

@universe7creator
Copy link
Copy Markdown

Summary

Replaces custom HTML escape table with Python stdlib html.escape() for improved security.

Changes

  • Use html.escape(text, quote=True) instead of manual mapping
  • Applied to both report_generator.py and docker_scanner.py
  • Reduces ~24 lines to ~4 lines

Security

Stdlib html.escape() is battle-tested and more secure.

Fixes #48

- Use Python's html.escape() instead of custom escape table
- More secure and battle-tested implementation
- Reduces code complexity (~30 lines saved)

Fixes docksec-security#48
@universe7creator
Copy link
Copy Markdown
Author

Hi @advaitpatel!

Quick check-in on PRs #61 and #62 - both are simple security fixes, conflict-free, and ready to merge whenever you have a moment.

No rush, just wanted to put them back on your radar. Thanks for all your work on this project!

@universe7creator
Copy link
Copy Markdown
Author

Hi @advaitpatel! Quick check-in on this PR - its a simple security fix, conflict-free, and ready to merge. No rush, just wanted to put it back on your radar. Thanks for maintaining this project!

@universe7creator
Copy link
Copy Markdown
Author

Hi @advaitpatel,

Following up on this PR. It's mergeable and ready. Please let me know if anything else is needed!

Thanks!

@universe7creator
Copy link
Copy Markdown
Author

Hi @advaitpatel! Hope you are doing well. Quick follow-up on PRs #61 and #62 - both are simple security fixes, conflict-free, and ready to merge whenever you have a moment. No rush at all - just wanted to make sure they did not get lost in the queue. Thanks for maintaining this project!

@universe7creator
Copy link
Copy Markdown
Author

Hi @advaitpatel,

Just checking if there's anything needed from my side to help get this merged? Happy to make any changes if required.

Thanks!

@universe7creator
Copy link
Copy Markdown
Author

@advaitpatel Friendly ping! This PR improves security by using stdlib html.escape(). Ready to merge if no changes needed!

@universe7creator
Copy link
Copy Markdown
Author

@advaitpatel Friendly ping! This security fix using stdlib html.escape is ready. Let me know if any changes needed for merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SECURITY] Replace custom HTML escape table with stdlib html.escape() in report generation

1 participant