@secretlint/secretlint-rule-aws
Advanced tools
Comparing version 1.1.0 to 2.0.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [2.0.0](https://github.com/secretlint/secretlint/compare/v1.1.0...v2.0.0) (2020-04-27) | ||
**Note:** Version bump only for package @secretlint/secretlint-rule-aws | ||
# [1.1.0](https://github.com/secretlint/secretlint/compare/v1.0.5...v1.1.0) (2020-04-04) | ||
@@ -8,0 +16,0 @@ |
@@ -15,12 +15,24 @@ import { SecretLintRuleCreator } from "@secretlint/types"; | ||
AWSAccountID: { | ||
en: string; | ||
ja: string; | ||
en: (props: { | ||
ID: string; | ||
}) => string; | ||
ja: (props: { | ||
ID: string; | ||
}) => string; | ||
}; | ||
AWSSecretAccessKey: { | ||
en: string; | ||
ja: string; | ||
en: (props: { | ||
KEY: string; | ||
}) => string; | ||
ja: (props: { | ||
KEY: string; | ||
}) => string; | ||
}; | ||
AWSAccessKeyID: { | ||
en: string; | ||
ja: string; | ||
en: (props: { | ||
ID: string; | ||
}) => string; | ||
ja: (props: { | ||
ID: string; | ||
}) => string; | ||
}; | ||
@@ -27,0 +39,0 @@ }; |
@@ -12,17 +12,17 @@ "use strict"; | ||
AWSAccountID: ["AKIAIOSFODNN7EXAMPLE"], | ||
AWSSecretAccessKey: ["wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"] | ||
AWSSecretAccessKey: ["wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"], | ||
}; | ||
exports.messages = { | ||
AWSAccountID: { | ||
en: "found AWS Account ID: {{ID}}", | ||
ja: "AWS Account ID: {{ID}} がみつかりました" | ||
en: (props) => `found AWS Account ID: ${props.ID}`, | ||
ja: (props) => `AWS Account ID: ${props.ID} がみつかりました`, | ||
}, | ||
AWSSecretAccessKey: { | ||
en: "found AWS Secret Access Key: {{KEY}}", | ||
ja: "AWS Secret Access Key: {{KEY}} がみつかりました" | ||
en: (props) => `found AWS Secret Access Key: ${props.KEY}`, | ||
ja: (props) => `AWS Secret Access Key: ${props.KEY} がみつかりました`, | ||
}, | ||
AWSAccessKeyID: { | ||
en: "found AWS Access Key ID: {{ID}}", | ||
ja: "AWS Access Key Id: {{ID}} がみつかりました" | ||
} | ||
en: (props) => `found AWS Access Key ID: ${props.ID}`, | ||
ja: (props) => `AWS Access Key Id: ${props.ID} がみつかりました`, | ||
}, | ||
}; | ||
@@ -45,3 +45,3 @@ /* | ||
*/ | ||
const reportAWSAccessKey = ({ t, source, context, options }) => { | ||
const reportAWSAccessKey = ({ t, source, context, options, }) => { | ||
// AWS Access Key ID | ||
@@ -65,9 +65,9 @@ // Example) AKIAIOSFODNN7SECRETS | ||
message: t("AWSAccessKeyID", { | ||
ID: match | ||
ID: match, | ||
}), | ||
range | ||
range, | ||
}); | ||
} | ||
}; | ||
const reportAWSSecretAccessKey = ({ t, source, context, options }) => { | ||
const reportAWSSecretAccessKey = ({ t, source, context, options, }) => { | ||
const AWS = "(?:AWS|aws|Aws)?_?"; | ||
@@ -95,9 +95,9 @@ const QUOTE = `["']?`; | ||
message: t("AWSSecretAccessKey", { | ||
KEY: match | ||
KEY: match, | ||
}), | ||
range | ||
range, | ||
}); | ||
} | ||
}; | ||
const reportAWSAccountID = ({ t, source, context, options }) => { | ||
const reportAWSAccountID = ({ t, source, context, options, }) => { | ||
const AWS = "(AWS|aws|Aws)?_?"; | ||
@@ -118,5 +118,5 @@ const QUOTE = `("|')?`; | ||
message: t("AWSAccountID", { | ||
ID: match | ||
ID: match, | ||
}), | ||
range | ||
range, | ||
}); | ||
@@ -133,8 +133,8 @@ } | ||
docs: { | ||
url: "https://github.com/secretlint/secretlint/blob/master/packages/%40secretlint/secretlint-rule-aws/README.md" | ||
} | ||
url: "https://github.com/secretlint/secretlint/blob/master/packages/%40secretlint/secretlint-rule-aws/README.md", | ||
}, | ||
}, | ||
create(context, options) { | ||
const normalizedOptions = { | ||
allows: options.allows || [] | ||
allows: options.allows || [], | ||
}; | ||
@@ -147,7 +147,7 @@ const t = context.createTranslator(exports.messages); | ||
reportAWSAccountID({ t, source: source, context: context, options: normalizedOptions }); | ||
} | ||
}, | ||
}; | ||
} | ||
}, | ||
}; | ||
exports.default = exports.creator; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@secretlint/secretlint-rule-aws", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "A secretlint rule for AWS.", | ||
@@ -46,3 +46,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@secretlint/types": "^1.1.0", | ||
"@secretlint/types": "^2.0.0", | ||
"@textlint/regexp-string-matcher": "^1.1.0", | ||
@@ -53,3 +53,3 @@ "regx": "^1.0.4", | ||
"devDependencies": { | ||
"@secretlint/tester": "^1.1.0", | ||
"@secretlint/tester": "^2.0.0", | ||
"@types/mocha": "^7.0.1", | ||
@@ -68,3 +68,3 @@ "@types/node": "^13.9.3", | ||
}, | ||
"gitHead": "d924bd2e020439f449aa24d1673a3d212ebefa49" | ||
"gitHead": "d961f968a46561ca424d54d6f34ce94e245a6e16" | ||
} |
@@ -21,17 +21,17 @@ import { SecretLintRuleContext, SecretLintRuleCreator, SecretLintSourceCode } from "@secretlint/types"; | ||
AWSAccountID: ["AKIAIOSFODNN7EXAMPLE"], | ||
AWSSecretAccessKey: ["wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"] | ||
AWSSecretAccessKey: ["wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"], | ||
}; | ||
export const messages = { | ||
AWSAccountID: { | ||
en: "found AWS Account ID: {{ID}}", | ||
ja: "AWS Account ID: {{ID}} がみつかりました" | ||
en: (props: { ID: string }) => `found AWS Account ID: ${props.ID}`, | ||
ja: (props: { ID: string }) => `AWS Account ID: ${props.ID} がみつかりました`, | ||
}, | ||
AWSSecretAccessKey: { | ||
en: "found AWS Secret Access Key: {{KEY}}", | ||
ja: "AWS Secret Access Key: {{KEY}} がみつかりました" | ||
en: (props: { KEY: string }) => `found AWS Secret Access Key: ${props.KEY}`, | ||
ja: (props: { KEY: string }) => `AWS Secret Access Key: ${props.KEY} がみつかりました`, | ||
}, | ||
AWSAccessKeyID: { | ||
en: "found AWS Access Key ID: {{ID}}", | ||
ja: "AWS Access Key Id: {{ID}} がみつかりました" | ||
} | ||
en: (props: { ID: string }) => `found AWS Access Key ID: ${props.ID}`, | ||
ja: (props: { ID: string }) => `AWS Access Key Id: ${props.ID} がみつかりました`, | ||
}, | ||
}; | ||
@@ -58,3 +58,3 @@ /* | ||
context, | ||
options | ||
options, | ||
}: { | ||
@@ -84,5 +84,5 @@ t: SecretLintRuleMessageTranslate<typeof messages>; | ||
message: t("AWSAccessKeyID", { | ||
ID: match | ||
ID: match, | ||
}), | ||
range | ||
range, | ||
}); | ||
@@ -95,3 +95,3 @@ } | ||
context, | ||
options | ||
options, | ||
}: { | ||
@@ -125,5 +125,5 @@ t: SecretLintRuleMessageTranslate<typeof messages>; | ||
message: t("AWSSecretAccessKey", { | ||
KEY: match | ||
KEY: match, | ||
}), | ||
range | ||
range, | ||
}); | ||
@@ -137,3 +137,3 @@ } | ||
context, | ||
options | ||
options, | ||
}: { | ||
@@ -160,5 +160,5 @@ t: SecretLintRuleMessageTranslate<typeof messages>; | ||
message: t("AWSAccountID", { | ||
ID: match | ||
ID: match, | ||
}), | ||
range | ||
range, | ||
}); | ||
@@ -177,8 +177,8 @@ } | ||
url: | ||
"https://github.com/secretlint/secretlint/blob/master/packages/%40secretlint/secretlint-rule-aws/README.md" | ||
} | ||
"https://github.com/secretlint/secretlint/blob/master/packages/%40secretlint/secretlint-rule-aws/README.md", | ||
}, | ||
}, | ||
create(context, options) { | ||
const normalizedOptions: Required<Options> = { | ||
allows: options.allows || [] | ||
allows: options.allows || [], | ||
}; | ||
@@ -191,6 +191,6 @@ const t = context.createTranslator(messages); | ||
reportAWSAccountID({ t, source: source, context: context, options: normalizedOptions }); | ||
} | ||
}, | ||
}; | ||
} | ||
}, | ||
}; | ||
export default creator; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28206
357
+ Added@secretlint/types@2.2.0(transitive)
- Removed@secretlint/types@1.1.0(transitive)
Updated@secretlint/types@^2.0.0