Skip to content

Commit

Permalink
chg: [core] Authenticate to Vulnerability Lookup with X-API-KEY.
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricbonhomme committed Oct 28, 2024
1 parent 67c60fc commit b0e1226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fedivuln/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ def push_to_vulnerability_lookup(vulnerability_ids):
headers_json = {
"Content-Type": "application/json",
"accept": "application/json",
"X-API-KEY": f" {config.vulnerability_auth_token}",
}
sighting = {"type": "seen", "vulnerability": vulnerability_ids[0]}
try:
r = requests.post(
urllib.parse.urljoin(config.vulnerability_lookup_base_url, "sighting/"),
json=sighting,
headers=headers_json,
auth=("admin", "token"),
)
if r.status_code not in (200, 201):
print(
Expand Down

0 comments on commit b0e1226

Please sign in to comment.