trailofbits / http-security Goto Github PK
View Code? Open in Web Editor NEWParse HTTP Security Headers
License: MIT License
Parse HTTP Security Headers
License: MIT License
I keep confusing the library with secureheaders.
Probably better to just pass in the header.
I'm not sure if this was intentional, but following redirects is typically desirable in tools like this
The Request class should be an actual data structure, which methods to access the various headers and their fields.
There should be a Parser base class and separate parsers for each header.
The parser should recognize each directive from the CSP spec.
Add support for the Public-Key-Pins header.
URI parsing needs to be tested more heavily, especially dealing with parameters.
We also need to parse the Set-Cookie
header to check for insecure cookies.
Instead of Curl::Easy.http_head, maybe use GET? I've run into cases where HEAD requests are rejected or otherwise treated differently
twitter.com has CSP, cache-control, and STS headers but our library reports them as missing.
Expected: parsed content security policy, cache-control, and strict transport security headers.
We need to extract important data from the headers, not just parse/validate them.
Add the codeclimate-test-reporter gem to your Gemfile:
gem "codeclimate-test-reporter", group: :test, require: nil
Start the test reporter on the very first line of spec_helper.rb or test_helper.rb:
require "codeclimate-test-reporter"
CodeClimate::TestReporter.start
Transform the parse trees into simple Hashes of options.
ruby-head, jruby-19mode, and jruby-head fail on building curb. Probably not our problem, but we should try to fix anyway.
https://travis-ci.org/trailofbits/securityheaders/jobs/40618608
http://difrwear.com/ has an unusual X-Xss-Protection header
:
1; mode=block; report=/xss-report/25b8988e-64ff-45a8-b0c6-2700fc1e9abd?source%5Baction%5D=index&source%5Bcontroller%5D=shop&source%5Bsection%5D=storefront
At first I thought the report=...
part was an HTTP header extension. However, header extensions can only be of the form token=token
or token="quoted-string"
.
We need a list of Alexa 100, who support https://
. Many domains in the Alexa 100 only support http://
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.