Skip to content

Commit

Permalink
Ensure multiple suppressions work as expected
Browse files Browse the repository at this point in the history
Fixes issue #104
  • Loading branch information
mattmook committed Jan 3, 2025
1 parent 9bb2376 commit f2afe9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mobsfscan/mobsfscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def post_ignore_files(self):
# any matches in the file for the rule
if self.suppress_pm_comments(file, rule_id):
# remove all matches of the file for the rule
tmp_files = self.remove_matches(file, files)
tmp_files = self.remove_matches(file, tmp_files)
if len(tmp_files) == 0:
del_keys.add(rule_id)
details['files'] = tmp_files
Expand Down
12 changes: 12 additions & 0 deletions tests/assets/src/dot_mobsf/scan_but_ignore2.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
private fun showN(show: Boolean) {

xyz.visibility = if (show) View.GONE else View.VISIBLE
xyz.animate()

}

Log.e("foo", foo.toString())



android.secret_key="supersecret key" // mobsf-ignore: android_kotlin_hardcoded

0 comments on commit f2afe9c

Please sign in to comment.