Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Improvement fo passing --min-score when printing report #42

@danieldanielecki

Description

@danieldanielecki

Current Behaviour

Now if I run $ observatory MYDOMAIN.com --format report --zero --min-score 100 I got no logs for the report, there's error only if it fails. For passing there's simply nothing, the script passes. In both cases without printing the report. Only if I'll run $ observatory MYDOMAIN.com --format report --zero then I got:

HTTP Observatory Report: MYDOMAIN.com

Score Rule                           Description
  -10 content-security-policy        Content Security Policy (CSP) implemented, but allows 'unsafe-eval'.
    0 x-xss-protection               X-XSS-Protection header set to "1; mode=block".
    0 x-content-type-options         X-Content-Type-Options header set to "nosniff".
    0 cross-origin-resource-sharing  Content is visible via cross-origin resource sharing (CORS) files or headers, but is restricted to specific domains.
    0 public-key-pinning             HTTP Public Key Pinning (HPKP) header not implemented.
    0 redirection                    Initial redirection is to HTTPS on same host, final destination is HTTPS.
    0 contribute                     Contribute.json isn't required on websites that don't belong to Mozilla.
    0 strict-transport-security      HTTP Strict Transport Security (HSTS) header set to a minimum of six months (15768000).
    0 subresource-integrity          Subresource Integrity (SRI) not implemented, but all scripts are loaded from a similar origin.
    5 cookies                        All cookies use the Secure flag, session cookies use the HttpOnly flag, and cross-origin restrictions are in place via the SameSite flag.
    5 x-frame-options                X-Frame-Options (XFO) implemented via the CSP frame-ancestors directive.
    5 referrer-policy                Referrer-Policy header set to "no-referrer", "same-origin", "strict-origin" or "strict-origin-when-cross-origin".

Score: 105
Grade: A+

Now, to have combined report plus passing/failing based on minimal score I need to run one more command, i.e. $ observatory MYDOMAIN --min-score 100.

Expected Behaviour

Run $ observatory MYDOMAIN --format report --zero --min-score 100 and display the report plus show if the test passed or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions