
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@golemio/audit-logs
Advanced tools
This module is intended for use with Golemio services. Refer here for further information on usage, local development and more.
The APIs may be unstable. Therefore, we recommend to install this module as an exact version.
# Latest version
npm install --save-exact @golemio/audit-logs@latest
# Development version
npm install --save-exact @golemio/audit-logs@dev
For local integration tests, run database migrations with the audit_logs
schema.
npx golemio migrate-db up --postgres --schema audit_logs
For information on how to use this module with default module schema migrations, see golemio-cli docs.
Configuring the database schema to use for audit logging using dependency injection:
// Di.ts
import { AuditLogsContainer } from "@golemio/audit-logs";
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
import { ILogger } from "@golemio/core/dist/helpers";
import { instanceCachingFactory } from "@golemio/core/dist/shared/tsyringe";
// ...create your module container
// ...register database connector for your module container
// ...register logger for your module container
YourModuleContainer.register("your_audit_logs_token", {
useFactory: instanceCachingFactory<AuditLogger>((c) => {
return new AuditLogger(
YourModuleContainer.resolve<IDatabaseConnector>("your_database_connector_token"),
YourModuleContainer.resolve<ILogger>("your_logger_token"),
{ schema: "your_module_database_schema" }
);
}),
});
The audit logger can then be used as follows:
// YourClass.ts
import { inject } from "@golemio/core/dist/shared/tsyringe";
import { AuditLogger } from "@golemio/audit-logs";
export class YourClass {
constructor(@inject("your_audit_logs_token") private auditLogger: AuditLogger) {}
async someMethod() {
await this.auditLogger.log({ action: "test-action", entity: "test-entity", userId: "test-user-id" /*, data: {...} */ });
}
}
Note that logging can be used only after your database connector has been connected to the database.
FAQs
Golemio Audit Logs Module
We found that @golemio/audit-logs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.