Files
Anthropic-Cybersecurity-Skills/skills
Syed Farhan Ahmed a134047328 Fix always-empty timestamp in IOC extraction report
generate_ioc_report()'s "generated" field used:
    datetime.utcnow().isoformat() if "datetime" in dir() else ""

"datetime" is never imported anywhere in this file, and dir() with
no arguments only inspects local scope names -- so this guard is
always False, and every generated report had "generated": "" instead
of a real timestamp.

Fixed by importing datetime/timezone at the top and calling
datetime.now(timezone.utc).isoformat() directly (the non-deprecated
replacement for utcnow(), since Python 3.12 deprecates utcnow()).

Tested: python3 -m py_compile, --help works, and:
    python3 agent.py report --file <any file>
now produces a real ISO 8601 UTC timestamp
(e.g. "2026-07-17T14:46:03.178652+00:00") instead of an empty string.
2026-07-17 19:46:11 +05:00
..