Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
zone.cogni.lib.methodtimer:methodtimer
Advanced tools
Easy way to add http headers based on configuration.
implementation("zone.cogni.lib:httpheaders:0.0.3")
Just add this in your @Configuration
or @SpringBootApplication
class
@EnableHttpHeaders
cognizone:
http:
headers:
- type: plain
key: X-Frame-Options
value: sameorigin
- type: plain
key: X-My-Server
value: El serveros
Note 1: type
can be omitted. If not set default plain
will be used.
Note 2: At the moment, type
can only be equal to plain
.
This will just return the value as specified in the configuration.
In the future types like spelExpression
and such can be added.
Library that can report how much time each method execution takes by just adding an annotation.
Note, due to default spring class-proxy limitations for Beans, annotations will only be picked up when called from outside the Bean. A workaround for this is being created.
implementation("zone.cogni.lib:methodtimer:0.0.3")
Method timer needs to have aspectJ proxying enabled:
Just add @EnableAspectJAutoProxy
in your @Configuration
or @SpringBootApplication
class.
To enable the timers just add this (by default timers are disabled). In java
cognizone:
methodtimer:
enabled: true
Just add @TimedMethod
annotation to the method to be timed (needs to be a method inside a Bean that is called from the outside).
simple classname
+ method name
.
You can overwrite this by setting the value()
of the @TimedMethod
annotation.@TimerName
on parameters of the method.
This will do a toString()
on that method parameter and the result is appended to the default timer name.@TimedMethod
annotation is hit in a thread, a new timer is started.
Once that method finishes, the timers of all annotated methods will be reported.
canBeParent
to false on @TimedMethod
.zone.cogni.lib.methodtimer.impl.Slf4jTimerReport
.FAQs
Unknown package
We found that zone.cogni.lib.methodtimer:methodtimer demonstrated a not healthy version release cadence and project activity because the last version was released 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.