diff --git a/mobsfscan/mobsfscan.py b/mobsfscan/mobsfscan.py index 45d821d..f12e0e6 100644 --- a/mobsfscan/mobsfscan.py +++ b/mobsfscan/mobsfscan.py @@ -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 diff --git a/tests/assets/src/dot_mobsf/scan_but_ignore2.kt b/tests/assets/src/dot_mobsf/scan_but_ignore2.kt new file mode 100644 index 0000000..a849c7e --- /dev/null +++ b/tests/assets/src/dot_mobsf/scan_but_ignore2.kt @@ -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 \ No newline at end of file