Skip to content

Commit

Permalink
Warning messages about max number of overrides for beginners (#878)
Browse files Browse the repository at this point in the history
Summary:
#870

This pull request addresses the issue of warnings related to classes with a high number of overrides in Pysa. It includes the following changes:

**Update Override Warning Messages:**

Enhanced the warning messages for classes with many overrides to include a suggestion to use the maximum_overrides_to_analyze option.
Added a link to the relevant documentation for further guidance.

**Configuration Updates:**

Added the maximum_overrides_to_analyze option to the taint.config files for different exercises to improve analysis performance and reduce warning messages.

**Please provide any feedback as comments for this pull request. I will then apply the feedback and update the code. **

Pull Request resolved: #878

Reviewed By: tianhan0

Differential Revision: D58673147

Pulled By: arthaud

fbshipit-source-id: 364a5ec6865c737562906cda6d164120e8698b05
  • Loading branch information
esohel30 authored and facebook-github-bot committed Jun 18, 2024
1 parent 865d869 commit 4ca7155
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 5 additions & 1 deletion documentation/pysa_tutorial/exercise1/taint.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@
"sinks": [ "CodeExecution" ],
"message_format": "User specified data may reach a code execution sink"
}
]
],

"maximum_overrides_to_analyze": 30
}


4 changes: 3 additions & 1 deletion documentation/pysa_tutorial/exercise2/taint.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@
"sinks": [ "CodeExecution" ],
"message_format": "User specified data may reach a code execution sink"
}
]
],

"maximum_overrides_to_analyze": 30
}
5 changes: 3 additions & 2 deletions documentation/pysa_tutorial/exercise4/taint.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"features": [
{
"name": "example",
"comment": "Copy this feature and write your own. Don't forget that JSON lists are comma seperated!"
"comment": "Copy this feature and write your own. Don't forget that JSON lists are comma separated!"
}
],
"rules": []
"rules": [],
"maximum_overrides_to_analyze": 30
}

0 comments on commit 4ca7155

Please sign in to comment.