ballerina:13 reports boolean strings, auth scheme names and qualified secret names
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- security, testing-qa
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 15
- Forks
- 12
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 20
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ballerina-platform/static-code-analysis-tool
-
Platform plugin output is written to standard output and breaks redirected JSON/SARIF resultsPosiblemente ocupada @TharmiganK la tomó hace 1 día. AbiertoArea/CLI Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ballerina-platform/static-code-analysis-tool#167 ·
Los mantenedores suelen responder en 1 día
-
Module file paths in the JSON report are only file namesPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoArea/Reports Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ballerina-platform/static-code-analysis-tool#152 ·
Los mantenedores suelen responder en 1 día
-
Area/CLI Type/Improvement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ballerina-platform/static-code-analysis-tool#140 ·
Los mantenedores suelen responder en 1 día
-
Area/Rules Type/Bug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
ballerina-platform/static-code-analysis-tool#179 ·
Los mantenedores suelen responder en 1 día
-
Area/Rules Type/Bug
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
ballerina-platform/static-code-analysis-tool#177 ·
Los mantenedores suelen responder en 1 día
Todos los issues de ballerina-platform/static-code-analysis-tool
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
wultra/powerauth-tests#980 ·
-
account bug communication lecture
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
line/centraldogma#1397 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
cryptomator/hub#515 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
vert-x3/vertx-mail-client#268 ·