Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.11.2] - 2026-02-14

### Fixed
- Fine-grained detection now seeds taint from changed CSS/SCSS files within the project (with CSS module granularity for `*.module.scss`/`*.module.css`)

## [0.11.1] - 2026-02-14

### Changed
Expand Down Expand Up @@ -146,6 +151,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Multi-stage Docker build
- Automated vendor upgrade workflow

[0.11.2]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.11.1...v0.11.2
[0.11.1]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.11.0...v0.11.1
[0.11.0]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.10.0...v0.11.0
[0.10.0]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.9.5...v0.10.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.1
0.11.2
46 changes: 46 additions & 0 deletions internal/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,52 @@ func FindAffectedFiles(globPattern string, filterPattern string, upstreamTaint m
}
}

// Seed from changed CSS/SCSS files within the project.
// For CSS module imports (*.module.scss/css) with named bindings, only taint symbols
// that use the imported binding. For all other style imports, taint all symbols.
changedStyleFiles := make(map[string]bool)
for _, f := range changedFiles {
if !strings.HasPrefix(f, projectFolder+"/") {
continue
}
relToProject := strings.TrimPrefix(f, projectFolder+"/")
ext := strings.ToLower(filepath.Ext(relToProject))
if ext == ".scss" || ext == ".css" {
changedStyleFiles[relToProject] = true
}
}
if len(changedStyleFiles) > 0 {
for stem, analysis := range fileAnalyses {
for _, imp := range analysis.Imports {
if !strings.HasPrefix(imp.Source, ".") {
continue
}
if !isStyleImport(imp.Source) {
continue
}
fileDir := filepath.Dir(stem + ".ts")
resolved := filepath.Join(fileDir, imp.Source)
resolved = filepath.Clean(resolved)
if !changedStyleFiles[resolved] {
continue
}
if tainted[stem] == nil {
tainted[stem] = make(map[string]bool)
}
if isCSSModule(imp.Source) && len(imp.Names) > 0 {
usageTainted := findTaintedSymbolsByUsage(analysis, imp.Names)
for _, s := range usageTainted {
tainted[stem][s] = true
}
} else {
for _, sym := range analysis.Symbols {
tainted[stem][sym.Name] = true
}
}
}
}
}

if len(tainted) == 0 {
return nil
}
Expand Down