Socket
Socket
Sign inDemoInstall

aws-sg-container

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-sg-container - npm Package Compare versions

Comparing version 0.16.3 to 0.16.4

33

lib/sg.js

@@ -18,14 +18,10 @@ /*

var _ = require('lodash');
var _ec2;
var _config;
var _mode;
var handleGroup = function(system, container, out, cb) {
exports.handleSecurityGroup = function(mode, config, ec2, system, container, out, cb) {
var sg = container.specific;
var match = false;
var sgParams = { GroupIds: [container.nativeId] };
var filters = [];
filters.push({Name: 'tag:nscale-system', Values: [system.name + '-' + system.topology.name]});
_ec2.describeSecurityGroups(sgParams, function(err, sgroups) {
ec2.describeSecurityGroups({ Filters: filters }, function(err, sgroups) {
var c = _.find(system.topology.containers, function(cont) { return cont.id === container.id; });

@@ -38,5 +34,5 @@

if (!match || (err && err.name && -1 !== err.name.indexOf('NotFound'))) {
_ec2.createSecurityGroup({Description: sg.Description,
ec2.createSecurityGroup({Description: sg.Description,
GroupName: container.id,
VpcId: sg.VpcId || _config.defaultVpcId}, function(err, resp) {
VpcId: sg.VpcId || config.defaultVpcId}, function(err, resp) {
if (err) {

@@ -54,3 +50,3 @@ if (-1 !== err.name.indexOf('InvalidGroup.Duplicate')) {

tagParams.Tags.push({Key: 'Name', Value: container.id});
_ec2.createTags(tagParams, function() {
ec2.createTags(tagParams, function() {
c.nativeId = resp.GroupId;

@@ -62,3 +58,3 @@ c.groupId = resp.GroupId;

var params = {GroupId : resp.GroupId, IpPermissions : sg.IpPermissions};
_ec2.authorizeSecurityGroupIngress(params, function(err) {
ec2.authorizeSecurityGroupIngress(params, function(err) {
cb(err, system);

@@ -84,14 +80,1 @@ });

};
exports.handleSecurityGroup = function(mode, config, ec2, system, container, out, cb) {
_ec2 = ec2;
_config = config;
_mode = mode;
handleGroup(system, container, out, function(err, newSys) {
cb(err, newSys);
});
};

@@ -14,3 +14,3 @@ {

],
"version": "0.16.3",
"version": "0.16.4",
"license": "Artistic License 2.0",

@@ -17,0 +17,0 @@ "author": "Peter Elger (http://nearform.com/)",

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