1. Juniper Networks TechLibrary
Understanding Packet Flow in SRX Series Devices. This document outlines the first-path processing sequence. It explicitly shows that after initial packet sanity checks and NAT processing
the device performs a "Route lookup" to find the egress interface and zone. This is followed by the "Policy lookup" to check for a matching policy that allows the traffic.
2. Juniper Networks TechLibrary
Security Policies Processing. This documentation explains that a security policy match is based on traffic direction
defined by a from-zone and a to-zone. It states
"The device derives the from-zone from the interface the packet enters and the to-zone from the interface the packet exits." The exit interface is determined by the route lookup
confirming the route lookup must precede the policy lookup.