Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serverless-newrelic-lambda-layers

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-newrelic-lambda-layers - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

59

dist/index.js

@@ -76,2 +76,6 @@ "use strict";

}
get licenseKeySecretDisabled() {
return (typeof this.config.disableLicenseKeySecret === "boolean" &&
this.config.disableLicenseKeySecret);
}
get functions() {

@@ -127,23 +131,28 @@ return Object.assign.apply(null, this.serverless.service

}
// If the managed secret has already been created,
// there should be policies for it.
const secretAccess = yield this.checkForSecretPolicy();
let managedSecret;
if (secretAccess.secretExists) {
this.managedSecretConfigured = true;
}
else {
// Secret doesn't exist, so create it
managedSecret = yield new integration_1.default(this).createManagedSecret();
if (managedSecret && managedSecret.policyArn) {
if (!this.licenseKeySecretDisabled) {
// If the managed secret has already been created,
// there should be policies for it.
const secretAccess = yield this.checkForSecretPolicy();
let managedSecret;
if (secretAccess.secretExists) {
this.managedSecretConfigured = true;
}
else {
// Secret doesn't exist, so create it
managedSecret = yield new integration_1.default(this).createManagedSecret();
if (managedSecret && managedSecret.policyArn) {
this.managedSecretConfigured = true;
}
}
if (secretAccess.currentRegionPolicy.length > 0) {
const policyArn = secretAccess.currentRegionPolicy[0].Arn;
this.mgdPolicyArns = [...this.managedPolicyArns, policyArn];
}
else if (this.managedSecretConfigured) {
this.mgdPolicyArns = [
...this.managedPolicyArns,
managedSecret.policyArn
];
}
}
if (secretAccess.currentRegionPolicy.length > 0) {
const policyArn = secretAccess.currentRegionPolicy[0].Arn;
this.mgdPolicyArns = [...this.managedPolicyArns, policyArn];
}
else if (this.managedSecretConfigured) {
this.mgdPolicyArns = [...this.managedPolicyArns, managedSecret.policyArn];
}
return;

@@ -185,8 +194,10 @@ });

}
// before adding layer, attach secret access policy
// to each function's execution role:
const resources = this.resources;
Object.keys(resources)
.filter(resourceName => resources[resourceName].Type === `AWS::IAM::Role`)
.forEach(roleResource => this.applyPolicies(resources[roleResource].Properties));
if (!this.licenseKeySecretDisabled) {
// before adding layer, attach secret access policy
// to each function's execution role:
const resources = this.resources;
Object.keys(resources)
.filter(resourceName => resources[resourceName].Type === `AWS::IAM::Role`)
.forEach(roleResource => this.applyPolicies(resources[roleResource].Properties));
}
const funcs = this.functions;

@@ -193,0 +204,0 @@ const promises = [];

{
"name": "serverless-newrelic-lambda-layers",
"version": "1.1.4",
"version": "1.1.5",
"description": "Serverless plugin for NewRelic APM AWS Lambda layers.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -282,2 +282,12 @@ # serverless-newrelic-lambda-layers

#### `disableLicenseKeySecret` (optional)
Only required if you want to disable creating license key in AWS Secrets Manager. Setting this as `true` would create NEW_RELIC_LICENSE_KEY environment variable for the New Relic Lambda Extension to access.
```yaml
custom:
newRelic:
disableLicenseKeySecret: true
```
## Supported Runtimes

@@ -284,0 +294,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc