Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
django-xss-detection
This package contains a django template parser that can be used to find templates that contain variables that will not be escaped.
Readme
This package contains a django template parser that can be used to find templates that contain variables that will not be escaped. This package currently has no knowledge of custom filters, custom tags, and python code (e.g. uses of mark safe). The code has only been tested against django versions >= 1.5 and <= 1.7.
* django >= 1.5 and < 1.8
* lxml
This package can be used on the command line by running
python -m django_xss_detection.cli
The code works by monkey patching django template code and providing through
a callback function to VariableNode that ends up referring to the
CompileStringWrapper.handle_callback
method. The callback function is used
later when the code renders
a given template and encounters a variable node
that will not be escaped. The implementation of detecting unquoted variable nodes
in element attributes and variable nodes in a javascript context lacking
javascript escaping are not implemented through callbacks, see
get_non_quoted_attr_vars_for_template
and
get_non_js_escaped_results_for_template
in parse_template.py respectively.
Additionally, the code has modified versions of built in conditional tags,
such as {% if %}
and {% ifequal %}
, so as to render
all possible template
code. If this package does not work on your custom template tags then
you can add support for them similar to how waffle
template tags are
implemented (see templatetags/waffle.py
and the patch
method in util.py
).
FAQs
This package contains a django template parser that can be used to find templates that contain variables that will not be escaped.
We found that django-xss-detection demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.