Skip to content

Commit 7b53e38

Browse files
committed
fix: dependency_updater security, POSIX compliance, and improved descriptions
1 parent 24939dd commit 7b53e38

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

dependency_updater/dependency_updater.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,6 @@ func updater(token string, repoPath string, commit bool, githubAction bool) erro
8989
return fmt.Errorf("error resolving repo path: %s", err)
9090
}
9191

92-
// Ensure the resolved path stays within the workspace (CWE-22)
93-
base := os.Getenv("GITHUB_WORKSPACE")
94-
if base != "" {
95-
absBase, err := filepath.Abs(base)
96-
if err != nil {
97-
return fmt.Errorf("error resolving workspace base path: %w", err)
98-
}
99-
rel, err := filepath.Rel(absBase, repoPath)
100-
if err != nil || strings.HasPrefix(rel, "..") {
101-
return fmt.Errorf("security error: repo path '%s' is outside of workspace '%s'", repoPath, absBase)
102-
}
103-
}
104-
10592
f, err := os.ReadFile(filepath.Join(repoPath, "versions.json"))
10693
if err != nil {
10794
return fmt.Errorf("error reading versions JSON: %s", err)

0 commit comments

Comments
 (0)