Socket
Socket
Sign inDemoInstall

@secretlint/secretlint-rule-basicauth

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@secretlint/secretlint-rule-basicauth - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

18

CHANGELOG.md

@@ -6,2 +6,20 @@ # Change Log

# [2.0.0](https://github.com/secretlint/secretlint/compare/v1.1.0...v2.0.0) (2020-04-27)
### Bug Fixes
* **core:** change SecretLintRuleMessageTranslate to check statically ([03ccff1](https://github.com/secretlint/secretlint/commit/03ccff116390374193ca5975405b0cafeaf63932))
### BREAKING CHANGES
* **core:** It changes SecretLintRuleMessageTranslate interface
Rule need to change `messages` object format.
# [1.1.0](https://github.com/secretlint/secretlint/compare/v1.0.5...v1.1.0) (2020-04-04)

@@ -8,0 +26,0 @@

8

lib/index.d.ts
import { SecretLintRuleCreator } from "@secretlint/types";
export declare const messages: {
BasicAuth: {
en: string;
ja: string;
en: (props: {
CREDENTIAL: string;
}) => string;
ja: (props: {
CREDENTIAL: string;
}) => string;
};

@@ -7,0 +11,0 @@ };

@@ -7,7 +7,7 @@ "use strict";

BasicAuth: {
en: "found basic auth credential: {{CREDENTIAL}}",
ja: "ベーシック認証情報: {{CREDENTIAL}} がみつかりました"
}
en: (props) => `found basic auth credential: ${props.CREDENTIAL}`,
ja: (props) => `ベーシック認証情報: ${props.CREDENTIAL} がみつかりました`,
},
};
function reportIfFoundBasicAuth({ source, options, context, t }) {
function reportIfFoundBasicAuth({ source, options, context, t, }) {
// https://developer.mozilla.org/docs/Web/HTTP/Authentication

@@ -20,4 +20,2 @@ // https://ihateregex.io/expr/url

const match = result[0] || "";
const user = result.groups.user;
const password = result.groups.password;
const range = [index, index + match.length];

@@ -31,6 +29,4 @@ const allowedResults = regexp_string_matcher_1.matchPatterns(match, options.allows);

CREDENTIAL: match,
user,
password
}),
range
range,
});

@@ -47,4 +43,4 @@ }

docs: {
url: "https://github.com/secretlint/secretlint/blob/master/packages/%40secretlint/secretlint-rule-basicauth/README.md"
}
url: "https://github.com/secretlint/secretlint/blob/master/packages/%40secretlint/secretlint-rule-basicauth/README.md",
},
},

@@ -54,3 +50,3 @@ create(context, options) {

const normalizedOptions = {
allows: options.allows || []
allows: options.allows || [],
};

@@ -60,7 +56,7 @@ return {

reportIfFoundBasicAuth({ source, options: normalizedOptions, context, t });
}
},
};
}
},
};
exports.default = exports.creator;
//# sourceMappingURL=index.js.map
{
"name": "@secretlint/secretlint-rule-basicauth",
"version": "1.1.0",
"version": "2.0.0",
"description": "A secretlint rule that check Basic Authentication.",

@@ -46,3 +46,3 @@ "keywords": [

"dependencies": {
"@secretlint/types": "^1.1.0",
"@secretlint/types": "^2.0.0",
"@textlint/regexp-string-matcher": "^1.1.0",

@@ -65,3 +65,3 @@ "string.prototype.matchall": "^4.0.2"

},
"gitHead": "d924bd2e020439f449aa24d1673a3d212ebefa49"
"gitHead": "d961f968a46561ca424d54d6f34ce94e245a6e16"
}

@@ -5,3 +5,3 @@ import {

SecretLintRuleMessageTranslate,
SecretLintSourceCode
SecretLintSourceCode,
} from "@secretlint/types";

@@ -14,5 +14,5 @@ import { matchPatterns } from "@textlint/regexp-string-matcher";

BasicAuth: {
en: "found basic auth credential: {{CREDENTIAL}}",
ja: "ベーシック認証情報: {{CREDENTIAL}} がみつかりました"
}
en: (props: { CREDENTIAL: string }) => `found basic auth credential: ${props.CREDENTIAL}`,
ja: (props: { CREDENTIAL: string }) => `ベーシック認証情報: ${props.CREDENTIAL} がみつかりました`,
},
};

@@ -32,3 +32,3 @@

context,
t
t,
}: {

@@ -47,4 +47,2 @@ source: SecretLintSourceCode;

const match = result[0] || "";
const user = result.groups!.user;
const password = result.groups!.password;
const range = [index, index + match.length];

@@ -58,6 +56,4 @@ const allowedResults = matchPatterns(match, options.allows);

CREDENTIAL: match,
user,
password
}),
range
range,
});

@@ -76,4 +72,4 @@ }

url:
"https://github.com/secretlint/secretlint/blob/master/packages/%40secretlint/secretlint-rule-basicauth/README.md"
}
"https://github.com/secretlint/secretlint/blob/master/packages/%40secretlint/secretlint-rule-basicauth/README.md",
},
},

@@ -83,3 +79,3 @@ create(context, options) {

const normalizedOptions = {
allows: options.allows || []
allows: options.allows || [],
};

@@ -89,6 +85,6 @@ return {

reportIfFoundBasicAuth({ source, options: normalizedOptions, context, t });
}
},
};
}
},
};
export default creator;

Sorry, the diff of this file is not supported yet

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