Skip to content

Commit

Permalink
Merge branch 'main' into vulnerability-dashboard-batch-host-record-cr…
Browse files Browse the repository at this point in the history
…eation
  • Loading branch information
eashaw authored Jun 7, 2024
2 parents 27f4b34 + 4b38184 commit 0bd9e36
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions ee/vulnerability-dashboard/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
sails_session__url: redis://redis:6379
sails_custom__fleetBaseUrl: '' #Add the base url of your Fleet instance: ex: https://fleet.example.com
sails_custom__fleetApiToken: '' # Add the API token of an API-only user [?] Here's how you get one: https://fleetdm.com/docs/using-fleet/fleetctl-cli#get-the-api-token-of-an-api-only-user
sails_custom__fleetApiOptionalCookie: '' # If your fleet instance requires optional cookies, use this to interact with the APIs

redis:
image: "redis:alpine"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ module.exports = {
Authorization: `Bearer ${sails.config.custom.fleetApiToken}`
};

if (sails.config.custom.fleetApiOptionalCookie) {
headers['Cookie'] = sails.config.custom.fleetApiOptionalCookie;
}

let page = 0;
let HOSTS_PAGE_SIZE = 100;

Expand Down Expand Up @@ -85,4 +89,3 @@ module.exports = {


};

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ module.exports = {
let headers = {
Authorization: `Bearer ${sails.config.custom.fleetApiToken}`
};
if (sails.config.custom.fleetApiOptionalCookie) {
headers['Cookie'] = sails.config.custom.fleetApiOptionalCookie;
}
sails.log('Running custom shell script... (`sails run update-critical-software`)');


Expand Down Expand Up @@ -354,4 +357,3 @@ module.exports = {


};

3 changes: 3 additions & 0 deletions ee/vulnerability-dashboard/scripts/update-reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ module.exports = {
let headers = {
Authorization: `Bearer ${sails.config.custom.fleetApiToken}`
};
if (sails.config.custom.fleetApiOptionalCookie) {
headers['Cookie'] = sails.config.custom.fleetApiOptionalCookie;
}

// Keep track of the latest vulnerabilities, hosts, and software seen in the Fleet scan.
// We'll use these later to check if any records have gone missing.
Expand Down

0 comments on commit 0bd9e36

Please sign in to comment.