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.
github.com/newrelic/go-agent/v3/integrations/nrsecurityagent
The New Relic security agent analyzes your application for potentially exploitable vulnerabilities.
DO NOT use this integration in your production environment. It is intended only for use in your development and testing phases. Since it will attempt to actually find and exploit vulnerabilities in your code, it may cause data loss or crash the application. Therefore it should only be used with test data in a non-production environment that does not connect to any production services.
To learn how to use IAST with the New Relic Go Agent, check out our documentation.
import "github.com/newrelic/go-agent/v3/integrations/nrsecurityagent"
newrelic.NewApplication
:app, err := newrelic.NewApplication( ... )
err := nrsecurityagent.InitSecurityAgent(app,
nrsecurityagent.ConfigSecurityMode("IAST"),
nrsecurityagent.ConfigSecurityValidatorServiceEndPointUrl("wss://csec.nr-data.net"),
nrsecurityagent.ConfigSecurityEnable(true),
)
You can also configure the nrsecurityagent
integration using a YAML-formatted configuration file:
err := nrsecurityagent.InitSecurityAgent(app,
nrsecurityagent.ConfigSecurityFromYaml(),
)
In this case, you need to put the path to your YAML file in an environment variable:
NEW_RELIC_SECURITY_CONFIG_PATH={YOUR_PATH}/myappsecurity.yaml
The YAML file should have these contents (adjust as needed for your application):
enabled: true
# NR security provides two modes IAST and RASP
# Default is IAST
mode: IAST
# New Relic’s SaaS connection URLs
validator_service_url: wss://csec.nr-data.net
# Following category of security events
# can be disabled from generating.
detection:
rxss:
enabled: true
request:
body_limit:1
Note: To completely disable security, set NEW_RELIC_SECURITY_AGENT_ENABLED
env to false. (Otherwise, there are some security hooks that will already be in place before any of the other configuration settings can be taken into account. This environment variable setting will prevent that from happening.)
If you are using the nrgin
, nrgrpc
, nrmicro
, and/or nrmongo
integrations, they now contain code to support security analysis of the data they handle.
Additionally, the agent will inject vulnerability scanning to instrumented functions wherever possible, including datastore segments, SQL operations, and transactions.
If you are opening an HTTP protocol endpoint, place the newrelic.WrapListen
function around the endpoint name to enable vulnerability scanning against that endpoint. For example,
http.ListenAndServe(newrelic.WrapListen(":8000"), nil)
Generate traffic against your application for the IAST agent to detect vulnerabilities. Once vulnerabilities are detected they will be reported in the vulnerabilities list.
For more information, see godocs.
FAQs
Unknown package
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.