dgryski.semgrep-go.unixnano.not-after

profile photo of dgryskidgryski
Author
581
Download Count*
License

unless checking for wall clock inconsistencies, use !$T1.After($T2)

Run Locally

Run in CI

Defintion

rules:
  - id: not-after
    patterns:
      - pattern: $T1.UnixNano() <= $T2.UnixNano()
    message: |
      unless checking for wall clock inconsistencies, use !$T1.After($T2)
    languages:
      - go
    severity: ERROR
    metadata:
      license: MIT