ballerina:13 reports boolean strings, auth scheme names and qualified secret names
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java
- 領域
- security, testing-qa
調査の方向性
Start with the ballerina:13 rule implementation and its tests, especially the tests for #109 and the ballerina/http cases mentioned in the issue. Check how it recognizes boolean strings, authentication scheme values, and secret-like target names. Add coverage for the listed examples and confirm they are no longer reported while other hard-coded secrets still are.
索引モデルが issue の本文から書いたものです。
説明
Description
Rule ballerina:13 (Hard-coded secrets) reports string values that are not secrets, because the name of the target contains a secret-like word. #109 fixed boolean values, values built from configurables, and protocol keywords such as access_token. These forms are still reported:
import ballerina/http;
// 1. A boolean as a string, for the CORS `Access-Control-Allow-Credentials` header value
function assertCors(http:Response response, string credentials) {
}
// 2. A variable whose name only qualifies the secret word
function proxyStatus(http:Request req) returns string {
string hasAuthHeader = "No Proxy";
if req.hasHeader("Proxy-Authorization") {
hasAuthHeader = "Proxy";
}
return hasAuthHeader;
}
// 3. An authentication scheme name with no credential
function incompleteHeaders() returns [string, map<string>] {
string incompleteBasicAuth = "Basic";
return [incompleteBasicAuth, {"authorization": "Basic "}];
}
public function main() {
assertCors(new, "true");
}
"true", "No Proxy", "Proxy", "Basic" and "Basic " are reported.
Found in ballerina/http test packages.
Suggested Improvement
- Don't report
"true"and"false", as #109 already does for boolean values. - Don't report a value that is only an authentication scheme name (
Basic,Bearer,Digest, with or without the trailing space), in the same way as the protocol keywords in #109. - Don't treat a name as secret-named when the secret word is qualified by a boolean prefix such as
has,isoruse(hasAuthHeader).
Version
0.13.0
- 主要言語
- Java
- スター
- 15
- フォーク
- 12
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 20
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ballerina-platform/static-code-analysis-tool のほかの issue
-
Platform plugin output is written to standard output and breaks redirected JSON/SARIF results対応中かも @TharmiganK が 1 日前に担当しました。 オープンArea/CLI Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ballerina-platform/static-code-analysis-tool#167 ·
メンテナーはふだん 1 日以内に返信
-
Module file paths in the JSON report are only file names対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンArea/Reports Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ballerina-platform/static-code-analysis-tool#152 ·
メンテナーはふだん 1 日以内に返信
-
Area/CLI Type/Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ballerina-platform/static-code-analysis-tool#140 ·
メンテナーはふだん 1 日以内に返信
-
Area/Rules Type/Bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
ballerina-platform/static-code-analysis-tool#179 ·
メンテナーはふだん 1 日以内に返信
-
Area/Rules Type/Bug
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
ballerina-platform/static-code-analysis-tool#177 ·
メンテナーはふだん 1 日以内に返信
ballerina-platform/static-code-analysis-tool の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
wultra/powerauth-tests#980 ·
-
account bug communication lecture
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
line/centraldogma#1397 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
cryptomator/hub#515 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
vert-x3/vertx-mail-client#268 ·