Skip to content

Conversation

shivasurya
Copy link
Owner

Description:

Adding support for class with inheritance. Upon implementation,

class SSRFBase {
  string getName() {
    result = "Generic SSRF Sink"
  }
}

// Derived class
class SSRFSink extends SSRFBase {
  string getClass() {
    result = "Request"
  }
}

predicate isSink(Node obj) {
  obj instanceof SSRFSink
}

// Query to use the predicate
from SSRFSink a
where isSink(a)
select a, a.getClass()

Checklist:

  • Tests passing (gradle testGo)?
  • Lint passing (golangci-lint run this requires golangci-lint)?

@shivasurya shivasurya added the enhancement New feature or request label Dec 9, 2024
@shivasurya shivasurya self-assigned this Dec 9, 2024
Copy link

codecov bot commented Feb 1, 2025

Codecov Report

Attention: Patch coverage is 26.66667% with 22 lines in your changes missing coverage. Please review.

Project coverage is 72.42%. Comparing base (239922a) to head (6e8ba1e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sourcecode-parser/graph/query.go 26.66% 19 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
- Coverage   72.95%   72.42%   -0.54%     
==========================================
  Files          16       16              
  Lines        2448     2473      +25     
==========================================
+ Hits         1786     1791       +5     
- Misses        622      639      +17     
- Partials       40       43       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shivasurya shivasurya merged commit 17b5623 into main Feb 1, 2025
2 of 4 checks passed
@shivasurya shivasurya deleted the shiva/class-feature branch February 1, 2025 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant