@secretlint/secretlint-rule-gcp
Advanced tools
Comparing version 0.7.0 to 0.7.2
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.7.2](https://github.com/secretlint/secretlint/compare/v0.7.1...v0.7.2) (2020-03-01) | ||
### Bug Fixes | ||
* **secretlint-rule-gcp:** fix plaice holder of report ([f25cb0b](https://github.com/secretlint/secretlint/commit/f25cb0b1fae45e9420a7de7d291251cb5f4e56b5)) | ||
# [0.7.0](https://github.com/secretlint/secretlint/compare/v0.6.0...v0.7.0) (2020-03-01) | ||
@@ -8,0 +19,0 @@ |
@@ -8,10 +8,11 @@ "use strict"; | ||
const node_forge_1 = __importDefault(require("node-forge")); | ||
const path_1 = __importDefault(require("path")); | ||
exports.messages = { | ||
PrivateKeyP12: { | ||
en: "found CP Service Account's private key(p12): {{KEY}}", | ||
ja: "GCPサービスアカウントの秘密鍵(p12): {{KEY}} がみつかりました" | ||
en: "found CP Service Account's private key(p12): {{FILE_NAME}}", | ||
ja: "GCPサービスアカウントの秘密鍵(p12) {{FILE_NAME}} がみつかりました" | ||
}, | ||
PrivateKeyJSON: { | ||
en: "found GCP Service Account's private key(json): {{KEY}}", | ||
ja: "GCPサービスアカウントの秘密鍵(json): {{KEY}} がみつかりました" | ||
en: "found GCP Service Account's private key(json): {{FILE_NAME}}", | ||
ja: "GCPサービスアカウントの秘密鍵(json): {{FILE_NAME}} がみつかりました" | ||
} | ||
@@ -31,3 +32,5 @@ }; | ||
context.report({ | ||
message: t("PrivateKeyJSON"), | ||
message: t("PrivateKeyJSON", { | ||
FILE_NAME: source.filePath ? path_1.default.basename(source.filePath) : "" | ||
}), | ||
range: [0, source.content.length] | ||
@@ -56,4 +59,6 @@ }); | ||
context.report({ | ||
message: t("PrivateKeyP12"), | ||
range: [0, 0] | ||
message: t("PrivateKeyP12", { | ||
FILE_NAME: source.filePath ? path_1.default.basename(source.filePath) : "" | ||
}), | ||
range: [0, source.content.length] | ||
}); | ||
@@ -60,0 +65,0 @@ } |
{ | ||
"name": "@secretlint/secretlint-rule-gcp", | ||
"version": "0.7.0", | ||
"version": "0.7.2", | ||
"description": "A secretlint rule for GCP.", | ||
@@ -64,3 +64,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "b29781cbb16259b05547b66b5a728f56c9ad9698" | ||
"gitHead": "e92597c1378bb16ef051ee21fc1013e923270150" | ||
} |
@@ -28,3 +28,3 @@ # @secretlint/secretlint-rule-gcp | ||
### PrivateKeyP12 | ||
> found GCP Service Account's private key(p12): {{KEY}} | ||
> found GCP Service Account's private key(p12): {{FILE_NAME}} | ||
@@ -39,3 +39,3 @@ This p12 file includes private key for GCP Service Account. | ||
### PrivateKeyJSON | ||
> found GCP Service Account's private key(json): {{KEY}} | ||
> found GCP Service Account's private key(json): {{FILE_NAME}} | ||
@@ -42,0 +42,0 @@ This JSON file includes private key for GCP Service Account. |
@@ -9,11 +9,12 @@ import fs from "fs"; | ||
import forge from "node-forge"; | ||
import path from "path"; | ||
export const messages = { | ||
PrivateKeyP12: { | ||
en: "found CP Service Account's private key(p12): {{KEY}}", | ||
ja: "GCPサービスアカウントの秘密鍵(p12): {{KEY}} がみつかりました" | ||
en: "found CP Service Account's private key(p12): {{FILE_NAME}}", | ||
ja: "GCPサービスアカウントの秘密鍵(p12) {{FILE_NAME}} がみつかりました" | ||
}, | ||
PrivateKeyJSON: { | ||
en: "found GCP Service Account's private key(json): {{KEY}}", | ||
ja: "GCPサービスアカウントの秘密鍵(json): {{KEY}} がみつかりました" | ||
en: "found GCP Service Account's private key(json): {{FILE_NAME}}", | ||
ja: "GCPサービスアカウントの秘密鍵(json): {{FILE_NAME}} がみつかりました" | ||
} | ||
@@ -52,3 +53,5 @@ }; | ||
context.report({ | ||
message: t("PrivateKeyJSON"), | ||
message: t("PrivateKeyJSON", { | ||
FILE_NAME: source.filePath ? path.basename(source.filePath) : "" | ||
}), | ||
range: [0, source.content.length] | ||
@@ -86,4 +89,6 @@ }); | ||
context.report({ | ||
message: t("PrivateKeyP12"), | ||
range: [0, 0] | ||
message: t("PrivateKeyP12", { | ||
FILE_NAME: source.filePath ? path.basename(source.filePath) : "" | ||
}), | ||
range: [0, source.content.length] | ||
}); | ||
@@ -90,0 +95,0 @@ } catch { |
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
16557
235