fix(exploits): submit only current flags
- Filter Pamsave files by the active flag lifetime window. - Use Braindance attack-data record IDs instead of scanning history.
This commit is contained in:
1 parent
0b98b70bf9
commit
8f58bbef82
4 files changed
+82
-23
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import unittest
|
||||
from datetime import datetime, timezone
|
||||
|
||||
import password_substring
|
||||
|
||||
|
||||
class FreshFileTests(unittest.TestCase):
|
||||
def test_keeps_only_files_younger_than_flag_window(self) -> None:
|
||||
now = datetime(2026, 11, 29, 12, 0, tzinfo=timezone.utc)
|
||||
rows = [
|
||||
{"id": "fresh", "created_at": "2026-11-29T11:58:30"},
|
||||
{"id": "expired", "created_at": "2026-11-29T11:54:00"},
|
||||
]
|
||||
self.assertEqual(password_substring.fresh_file_ids(rows, now), ["fresh"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user