Skip to content

Show connection failures on startup#510

Merged
hansott merged 8 commits intomainfrom
add-logs-core-connection
Jan 27, 2025
Merged

Show connection failures on startup#510
hansott merged 8 commits intomainfrom
add-logs-core-connection

Conversation

@timokoessler
Copy link
Member

Extracted from #435

@codecov
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 57.69231% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
library/agent/Agent.ts 47.61% 11 Missing ⚠️

📢 Thoughts on this report? Let us know!

this.api.report(this.token, attack, this.timeoutInMS).catch((err) => {
console.error(
`Aikido: Failed to report attack event to Aikido platform: ${err.message}`
);
Copy link
Member

@hansott hansott Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if token was rotated when the app is running? Can we also catch the invalid_token error?


if (!response.success && response.error === "invalid_token") {
console.error(
"Aikido: Unable to access the Aikido platform, please check your token."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's extract a function to check response?

@hansott hansott changed the title Add always visible logs on core connection errors Show connection failures on startup Jan 27, 2025
@hansott hansott merged commit 38e877c into main Jan 27, 2025
10 of 11 checks passed
@hansott hansott deleted the add-logs-core-connection branch January 27, 2025 14:08
hansott added a commit that referenced this pull request Jan 27, 2025
* 'main' of github.com:AikidoSec/node-RASP: (209 commits)
  Only install library deps when publishing to npm (#511)
  Show connection failures on startup (#510)
  Fix duplicate clickhouse
  Run tests for supported dialects
  Update Zen internals to v0.1.36
  Only capture hostname if the port is known
  Fix Heartbeat event types
  Add test with invalid json
  fix: Do not override existing body
  Prevent double wrapping
  Fix linting
  Wrap Hono request body parsing methods
  Improve failing unit test
  Improve code coverage
  Fix linting
  Support fetch(new Request(...))
  Create failing unit test
  chore: added reference to env vars
  Use separate table for postgres sink tests
  Upgrade Zen internals to v0.1.35
  ...
hansott added a commit that referenced this pull request Feb 5, 2025
* 'main' of github.com:AikidoSec/node-RASP: (31 commits)
  Update Zen internals to v0.1.37
  Fix timestamp in mock server (#517)
  Remove unused methods (#516)
  Set timeout on workflows
  Use 401
  Increase timeout to 3s and append error message to log
  Check route level access before we check if IP is in bypass list
  Only install library deps when publishing to npm (#511)
  Show connection failures on startup (#510)
  Revert "Add failing test for route level allowed IPs"
  Fix duplicate clickhouse
  Run tests for supported dialects
  Update Zen internals to v0.1.36
  Add failing test for route level allowed IPs
  Only capture hostname if the port is known
  Fix Heartbeat event types
  Remove comment
  Force build of docker compose
  Add end2end test for bypass IP in blocklist
  Fix lint
  ...
hansott added a commit that referenced this pull request Feb 7, 2025
* 'main' of github.com:AikidoSec/node-RASP: (38 commits)
  Speed up unit tests (#497)
  Move outside if
  Keep original code
  Use Number.isInteger(...)
  Update Zen internals to v0.1.37
  Fix timestamp in mock server (#517)
  Remove unused methods (#516)
  Update readme
  Set timeout on workflows
  Use 401
  Increase timeout to 3s and append error message to log
  Check route level access before we check if IP is in bypass list
  Only install library deps when publishing to npm (#511)
  Show connection failures on startup (#510)
  Revert "Add failing test for route level allowed IPs"
  Fix duplicate clickhouse
  Run tests for supported dialects
  Update Zen internals to v0.1.36
  Add failing test for route level allowed IPs
  Only capture hostname if the port is known
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants