GithubHelp home page GithubHelp logo

djt_csp's Introduction

djt_csp

Add a panel to django-debug-toolbar for checking some security headers. djt_csp is a close copy of the Mozilla observatory.

Screenshot

Just install djt-csp...

python3 -m pip install djt-csp

and add "djt_csp.panel.SecurityPanel" to your settings DEBUG_TOOLBAR_PANELS.

# django-debug-toolbar
DEBUG_TOOLBAR_PANELS = [
    "debug_toolbar.panels.versions.VersionsPanel",
    "debug_toolbar.panels.timer.TimerPanel",
    "djt_csp.panel.SecurityPanel",
    "debug_toolbar.panels.settings.SettingsPanel",
    "debug_toolbar.panels.profiling.ProfilingPanel",
    "debug_toolbar.panels.headers.HeadersPanel",
    "debug_toolbar.panels.request.RequestPanel",
    "debug_toolbar.panels.sql.SQLPanel",
    "debug_toolbar.panels.templates.TemplatesPanel",
    "debug_toolbar.panels.staticfiles.StaticFilesPanel",
    "debug_toolbar.panels.cache.CachePanel",
    "debug_toolbar.panels.signals.SignalsPanel",
    "debug_toolbar.panels.redirects.RedirectsPanel",
]

djt_csp's People

Contributors

d9pouces avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

djt_csp's Issues

TypeError: __init__() missing 1 required positional argument: 'policies'

I'm packaging for openSUSE, and most tests are failing with this.

[   41s] ============================= test session starts ==============================
[   41s] platform linux -- Python 3.6.12, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.6
[   41s] cachedir: .pytest_cache
[   41s] rootdir: /home/abuild/rpmbuild/BUILD/djt_csp-0.9.7
[   42s] collecting ... collected 6 items
[   42s] 
[   42s] tests_djt_csp/test_parse_csp.py::TestCSPParser::test_cspparser_1 FAILED  [ 16%]
[   42s] tests_djt_csp/test_parse_csp.py::TestCSPParser::test_cspparser_2 FAILED  [ 33%]
[   42s] tests_djt_csp/test_parse_csp.py::TestCSPParser::test_cspparser_3 FAILED  [ 50%]
[   42s] tests_djt_csp/test_parse_csp.py::TestCSPParser::test_cspparser_4 FAILED  [ 66%]
[   42s] tests_djt_csp/test_parse_csp.py::TestCSPParser::test_cspparser_5 FAILED  [ 83%]
[   42s] tests_djt_csp/test_parse_csp.py::TestCSPParser::test_cspparser_6 PASSED  [100%]
[   42s] 
[   42s] =================================== FAILURES ===================================
[   42s] ________________________ TestCSPParser.test_cspparser_1 ________________________
[   42s] 
[   42s] self = <tests_djt_csp.test_parse_csp.TestCSPParser testMethod=test_cspparser_1>
[   42s] 
[   42s]     def test_cspparser_1(self):
[   42s] >       parser = CSPParser()
[   42s] E       TypeError: __init__() missing 1 required positional argument: 'policies'
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.