-
Notifications
You must be signed in to change notification settings - Fork 87
Remove frogbot-config.yml functionality - use only environment variables #952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
eyalk007
commented
Nov 5, 2025
- All tests passed. If this feature is not already covered by the tests, I added new tests.
- This pull request is on the dev branch.
- I used gofmt for formatting the code before submitting the pull request.
- Update documentation about new features / new supported technologies
- Deleted .frogbot/frogbot-config.yml from repo root - Deleted testdata/config/ directory with all config test files - Deleted .frogbot directories from scanrepository test subdirectories - Removed configPath parameters from test functions - Removed config file validation from schema tests - Removed unused config file path constants - Cleaned up unused imports Config files are no longer used - all configuration now comes from environment variables only
bc6b358 to
8ef541e
Compare
# Conflicts: # .frogbot/frogbot-config.yml # scanrepository/scanmultiplerepositories_test.go # utils/params.go
- Delete schema/ directory (frogbot-schema.json, tests, testdata) - deprecated YAML config files - Delete docs/templates/jfrog-pipelines/ - deprecated JFrog Pipelines platform templates
- Delete TestExtractAndAssertRepoParams - tested config YAML param extraction - Delete TestBuildRepoAggregatorWithEmptyScan - tested empty scan in config YAML - Delete TestBuildMergedRepoAggregator - tested merging config YAML with env vars These tests are now redundant since config YAML functionality was removed. The functionality they tested (env var extraction, defaults) is covered by other existing tests.
The prepareConfigAndClient function was missing RepoName in gitTestParams, causing 'repository name is missing' error in tests after config YAML removal.
After config YAML removal, these tests lost their configurations: scanpullrequest tests: - ScanPullRequestNoFail: Set JF_FAIL=false - ScanPullRequestMultiWorkDir: Set JF_WORKING_DIR=sub1,sub3/sub4,sub2 + JF_REQUIREMENTS_FILE - ScanPullRequestMultiWorkDirNoFail: Same as above scanrepository tests: - aggregate-multi-dir: Set JF_WORKING_DIR=npm1,npm2 - aggregate-multi-project: Set JF_WORKING_DIR=npm,pip + JF_REQUIREMENTS_FILE These env vars replace the deleted config YAML files that previously provided these settings.
1. Fixed missing function call: cmd.Run was not being called (missing parentheses) 2. Added proper cleanup for environment variables to prevent test interference: - JF_WORKING_DIRS was leaking between tests - aggregate-multi-dir would set npm1,npm2 and other tests would inherit it - This caused tests to look for vulnerabilities in wrong directories These fixes resolve the issue where tests pass individually but fail when run together.
The main issue was that JF_WORKING_DIRS environment variable was leaking between tests: - aggregate-multi-dir sets JF_WORKING_DIRS=npm1,npm2 - Later tests inherit this and look for vulnerabilities in wrong directories - Added proper defer cleanup with os.Unsetenv to prevent test interference This fixes the issue where tests pass individually but fail when run together.
at 🎯 Static Application Security Testing (SAST) VulnerabilityFull descriptionVulnerability Details
OverviewStored Cross-Site Scripting (XSS) is a type of vulnerability where malicious Vulnerable examplefunc serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
fmt.Fprintf(w, "<h1>%s</h1>", message)
}In this example, the RemediationTo mitigate Stored XSS vulnerabilities, always sanitize and encode user func serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
- fmt.Fprintf(w, "<h1>%s</h1>", message)
+ fmt.Fprintf(w, "<h1>%s</h1>", html.EscapeString(message))
}In the remediation, we've used the Code FlowsVulnerable data flow analysis result
|
at 🎯 Static Application Security Testing (SAST) VulnerabilityFull descriptionVulnerability Details
OverviewStored Cross-Site Scripting (XSS) is a type of vulnerability where malicious Vulnerable examplefunc serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
fmt.Fprintf(w, "<h1>%s</h1>", message)
}In this example, the RemediationTo mitigate Stored XSS vulnerabilities, always sanitize and encode user func serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
- fmt.Fprintf(w, "<h1>%s</h1>", message)
+ fmt.Fprintf(w, "<h1>%s</h1>", html.EscapeString(message))
}In the remediation, we've used the Code FlowsVulnerable data flow analysis result
|
📗 Scan Summary
|
at 🎯 Static Application Security Testing (SAST) VulnerabilityFull descriptionVulnerability Details
OverviewStored Cross-Site Scripting (XSS) is a type of vulnerability where malicious Vulnerable examplefunc serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
fmt.Fprintf(w, "<h1>%s</h1>", message)
}In this example, the RemediationTo mitigate Stored XSS vulnerabilities, always sanitize and encode user func serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
- fmt.Fprintf(w, "<h1>%s</h1>", message)
+ fmt.Fprintf(w, "<h1>%s</h1>", html.EscapeString(message))
}In the remediation, we've used the Code FlowsVulnerable data flow analysis result
|
at 🎯 Static Application Security Testing (SAST) VulnerabilityFull descriptionVulnerability Details
OverviewStored Cross-Site Scripting (XSS) is a type of vulnerability where malicious Vulnerable examplefunc serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
fmt.Fprintf(w, "<h1>%s</h1>", message)
}In this example, the RemediationTo mitigate Stored XSS vulnerabilities, always sanitize and encode user func serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
- fmt.Fprintf(w, "<h1>%s</h1>", message)
+ fmt.Fprintf(w, "<h1>%s</h1>", html.EscapeString(message))
}In the remediation, we've used the Code FlowsVulnerable data flow analysis result
|
at 🎯 Static Application Security Testing (SAST) VulnerabilityFull descriptionVulnerability Details
OverviewStored Cross-Site Scripting (XSS) is a type of vulnerability where malicious Vulnerable examplefunc serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
fmt.Fprintf(w, "<h1>%s</h1>", message)
}In this example, the RemediationTo mitigate Stored XSS vulnerabilities, always sanitize and encode user func serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
- fmt.Fprintf(w, "<h1>%s</h1>", message)
+ fmt.Fprintf(w, "<h1>%s</h1>", html.EscapeString(message))
}In the remediation, we've used the Code FlowsVulnerable data flow analysis result
|
at 🎯 Static Application Security Testing (SAST) VulnerabilityFull descriptionVulnerability Details
OverviewStored Cross-Site Scripting (XSS) is a type of vulnerability where malicious Vulnerable examplefunc serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
fmt.Fprintf(w, "<h1>%s</h1>", message)
}In this example, the RemediationTo mitigate Stored XSS vulnerabilities, always sanitize and encode user func serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
- fmt.Fprintf(w, "<h1>%s</h1>", message)
+ fmt.Fprintf(w, "<h1>%s</h1>", html.EscapeString(message))
}In the remediation, we've used the Code FlowsVulnerable data flow analysis result
|
at 🎯 Static Application Security Testing (SAST) VulnerabilityFull descriptionVulnerability Details
OverviewStored Cross-Site Scripting (XSS) is a type of vulnerability where malicious Vulnerable examplefunc serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
fmt.Fprintf(w, "<h1>%s</h1>", message)
}In this example, the RemediationTo mitigate Stored XSS vulnerabilities, always sanitize and encode user func serveMessage(w http.ResponseWriter, r *http.Request) {
db, _ := sql.Open("sqlite3", "test.db")
message := db.QueryRow("SELECT message FROM messages WHERE id = 1")
- fmt.Fprintf(w, "<h1>%s</h1>", message)
+ fmt.Fprintf(w, "<h1>%s</h1>", html.EscapeString(message))
}In the remediation, we've used the Code FlowsVulnerable data flow analysis result
|

