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

Commit

Permalink
point at new api and update banner
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA committed Jan 25, 2024
1 parent e67b69e commit 6bd650f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 20 deletions.
5 changes: 4 additions & 1 deletion src/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ module.exports = {
numImprovedSites: '240,000',
title: 'Mozilla Observatory',
urls: {
api: 'https://http-observatory.security.mozilla.org/api/v1/',
// api: 'https://http-observatory.security.mozilla.org/api/v1/',
api: 'https://prod.observatory.mdn.prod.webservices.mozgcp.net/api/v1/',
// api: 'https://stage.observatory.mdn.nonprod.webservices.mozgcp.net/api/v1/',
// api: 'http://localhost:57001/api/v1/',
ssh: 'https://sshscan.rubidus.com/api/v1/',
tls: 'https://tls-observatory.services.mozilla.com/api/v1/',
},
Expand Down
11 changes: 1 addition & 10 deletions src/js/observatories/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,6 @@ const insert = async (scan, results) => {
$('#tests-' + result.name + '-score-description').html(scoreDescription);
});

// note that HPKP is optional
if (includes(['hpkp-not-implemented',
'hpkp-not-implemented-no-https',
'hpkp-invalid-cert'],
results['public-key-pinning'].result)) {
$('#tests-public-key-pinning-score-description').text($('#tests-public-key-pinning-score-description').text() + ' (optional)');
$('#tests-public-key-pinning-pass').empty().append(utils.getOcticon('dash'));
}

// same for Referrer Policy
if ('referrer-policy' in results) {
if (includes(['referrer-policy-not-implemented'],
Expand Down Expand Up @@ -420,7 +411,7 @@ const insertHostHistory = async () => {

const loadHostHistory = async () => {
const target = utils.getTarget();
var API_URL = 'https://http-observatory.security.mozilla.org/api/v1/getHostHistory?host=' + target;
var API_URL = constants.urls.api + 'getHostHistory?host=' + target;

$.ajax({
method: 'GET',
Expand Down
7 changes: 0 additions & 7 deletions src/templates/analyze/http/test-scores.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@
<td id="tests-cross-origin-resource-sharing-score-description"></td>
<td class="tablesaw-hideable tablesaw-center"><span data-octicon="info" data-toggle="popover" title="Cross-origin Resource Sharing" data-content="Incorrectly configured CORS settings can allow foreign sites to read your site's contents, possibly allowing them access to private user information."></span></td>
</tr>
<tr>
<td class="title font-weight-bold tablesaw-nowrap"><a href="https://infosec.mozilla.org/guidelines/web_security#http-public-key-pinning">HTTP Public Key Pinning</a></td>
<td class="tablesaw-center" id="tests-public-key-pinning-pass" aria-hidden="true"></td>
<td class="tablesaw-center" id="tests-public-key-pinning-score"></td>
<td id="tests-public-key-pinning-score-description"></td>
<td class="tablesaw-hideable tablesaw-center"><span data-octicon="info" data-toggle="popover" title="HTTP Public Key Pinning" data-content="HTTP Public Key Pinning (HPKP) binds a site to a specific combination of certificate authorities and/or keys, protecting against the unauthorized issuance of certificates."></span></td>
</tr>
<tr>
<td class="title font-weight-bold tablesaw-nowrap"><a href="https://infosec.mozilla.org/guidelines/web_security#http-strict-transport-security">HTTP Strict Transport Security</a></td>
<td class="tablesaw-center" id="tests-strict-transport-security-pass" aria-hidden="true"></td>
Expand Down
4 changes: 2 additions & 2 deletions src/templates/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<body>
<header class="mb-0 mb-md-3">
<div class="alert alert-danger text-center" id="scoring-banner">
📣\uFE0E Heads up! Mozilla Observatory 2.0 launches on January 25, 2024. New security scoring standards will apply - Your website grade may change.
<a href="https://developer.mozilla.org/en-US/blog/mdn-observatory/" target="_blank">Learn More</a>.
📣\uFE0E Heads up! New security scoring standards apply - Your website grade may have changed. MDN Observatory will launch on January 31, 2024.
<a href="https://developer.mozilla.org/en-US/blog/mdn-observatory/?o" target="_blank">Learn More</a>.
</div>
<div class="container">
<nav class="navbar navbar-expand-lg navbar-primary bg-white">
Expand Down

0 comments on commit 6bd650f

Please sign in to comment.