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

dockerlint

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dockerlint - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

47

lib/checks.js

@@ -252,36 +252,31 @@ // Generated by CoffeeScript 1.12.4

exports.env = function(rules) {
var argument, env, eq_form, i, j, k, l, len, len1, len2, p, pair, ref, ref1, rule;
env = this.getAll('ENV', rules);
for (j = 0, len = env.length; j < len; j++) {
rule = env[j];
var argument, env, environs, j, k, l, len, len1, len2, p, pair, ref, ref1, rule;
environs = this.getAll('ENV', rules);
for (j = 0, len = environs.length; j < len; j++) {
rule = environs[j];
ref = rule["arguments"];
for (k = 0, len1 = ref.length; k < len1; k++) {
argument = ref[k];
eq_form = false;
i = 0;
ref1 = argument.split(' ');
for (l = 0, len2 = ref1.length; l < len2; l++) {
pair = ref1[l];
p = pair.split(/(\w+)=([^\s]+)/);
if (i === 0) {
if (p[1]) {
eq_form = true;
}
if (argument.split(' ')[0].match(/(\w+)=([^\s]+)/)) {
ref1 = argument.split(' ');
for (l = 0, len2 = ref1.length; l < len2; l++) {
pair = ref1[l];
p = pair.split(/(\w+)=([^\s]+)/);
exports.env['$' + p[1]] = p[2];
}
if ((!p[1] && eq_form) || (p[1] && !eq_form)) {
utils.log('ERROR', "ENV cannot mix the two formats for declaring variables line " + rule.line);
} else {
env = argument.match(/^(\S+)\s(.*)/);
if (env) {
env = env.slice(1);
} else {
utils.log('ERROR', "ENV invalid format " + rule["arguments"] + " on line " + rule.line);
return 'failed';
}
i++;
if (p[1]) {
exports.env['$' + p[1]] = p[2];
if (env[0] && env[1]) {
exports.env['$' + env[0]] = env[1];
} else {
utils.log('ERROR', "ENV invalid format " + rule["arguments"] + " on line " + rule.line);
return 'failed';
}
}
if (argument.match(/(\w+)=([^\s]+)/)) {
continue;
}
env = argument.match(/^(\S+)\s(.*)/).slice(1);
if (env[0] && env[1]) {
exports.env['$' + env[0]] = env[1];
}
}

@@ -288,0 +283,0 @@ }

{
"name": "dockerlint",
"version": "0.3.0",
"version": "0.3.1",
"description": "Linting for Dockerfiles",

@@ -5,0 +5,0 @@ "main": "bin/dockerlint",

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