
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
@forlagshuset/nestjs-audit-logging
Advanced tools
Library to facilitate adding custom audit log messages to nestjs controllers.
transport
class TestLoggerTransport implements Transport {
log(): any | Promise<any> {
return;
}
}
module
@Module({
imports: [],
controllers: [SomeController],
providers: [
AuditLogInterceptor,
{
provide: AuditLog,
useValue: new AuditLog({
actionType: ActionType.Object,
actorType: ActorType.Eportal,
service: { type: ServiceType.App, id: 'test.service' },
objectType: ObjectType.ErudioNamespace,
}),
},
{
provide: BaseAuditLogger,
useFactory: (auditLog: AuditLog) => {
baseAuditLogger = new BaseAuditLogger(
'test.one.two',
auditLog,
new TestLoggerTransport(),
);
return baseAuditLogger;
},
inject: [AuditLog],
},
]
})
controller
@Controller('/test')
export class TestController {
@AuditLogger({
action: ActionVerb.ACCESSED,
actorIdGetter: (req) => req.headers['x-gateway-user-id'],
objectIdGetter: (req) => req.params.id,
eventSubject: 'test',
errorTypes: [NotFoundException],
})
@Get('/error/:id')
action(@Param('id') id: string) {
// do some action
// success calls will be intercepted and audit log message will be emitted
// as for errors, only NotFoudException will be intercepted and an audit log message will be emitted. All errors needed for audit log should be specified upfront
}
}
FAQs
Nestjs Audit Logging Package
We found that @forlagshuset/nestjs-audit-logging demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.