Why does the lastModified timestamp for Panther rules change after CI/CD updates?
Last updated: October 30, 2024
Why does the lastModified timestamp for Panther rules change even when I haven't modified them?
When using CI/CD to update rules in Panther, you may notice that the lastModified timestamp for rules is updated even for rules that haven't been modified. This behavior is related to how Panther handles rule uploads during the CI/CD process.
ANSWER
The lastModified timestamp for Panther rules changes after CI/CD updates due to the way the Panther Analysis Tool upload command works. Here's what happens:
When you run Panther Analysis Tool
upload, it creates a.zipfile containing all rules in your repository, regardless of whether they've been modified or not.This
.zipfile is then uploaded to Panther.Panther overwrites all currently loaded rules with the rules from the
.zipfile, which updates thelastModifiedfield for all rules, even if their content hasn't changed.
Currently, there's no built-in mechanism in Panther to check if a rule has actually changed before updating its lastModified timestamp.