Hello Giuseppe,
I reviewed your decoder and rule, I find the first log you shared for the invalid user missing from the decoders, so I created one for you, please find it below. The other log matched.
<decoder name="pfsense-ssh-invalid-user">
<parent>PfSense-access</parent>
<prematch>sshd\s+\d+\s+-\s+-\s+Invalid user</prematch>
<regex type="pcre2">Invalid user\s+(\S+)\s+from\s+(\d{1,3}(?:\.\d{1,3}){3})\s+port\s+(\d+)</regex>
<order>srcuser,srcip,srcport</order>
</decoder>
For the rule, I could not see a match again with the logs you shared, but I created a sample.
For: 2025 Dec 16 19:14:18 (VPN-pfSense.aaa.local.lan) any->/var/log/system.log <38>1 2025-12-16T19:14:18.160543+01:00 VPN-pfSense.aaa.local.lan sshd 43682 - - Invalid user test from 10.1.1.111 port 58693
and: 2025 Dec 16 19:19:36 (VPN-pfSense.aaa.local.lan) any->/var/log/system.log <38>1 2025-12-16T19:19:36.307956+01:00 VPN-pfSense.aaa.local.lan sshd 2270 - - Accepted keyboard-interactive/pam for test from 10.1.1.111 port 58959 ssh2
<group name="pfsense,access,ssh,authentication,soc">
<!-- 100080 - SSH LOGIN OK -->
<rule id="100080" level="5">
<decoded_as>PfSense-access</decoded_as>
<match>Accepted keyboard-interactive/pam</match>
<description>pfSense keyboard-interactive/pam for $(srcuser) da $(srcip) porta $(srcport)</description>
<group>authentication_success,ssh,pfsense</group>
</rule>
<rule id="100081" level="9">
<decoded_as>PfSense-access</decoded_as>
<match>Invalid user</match>
<description> invalid $(srcuser) da $(srcip) porta $(srcport)</description>
<group>authentication_success,ssh,pfsense</group>
</rule>
</group>
If you noticed from the rules above, they reference the same parent decoder but are matching different logs because of the <match> tag I introduced. This is to ensure the rule is associated with the right logs.
Depending on what you are trying to achieve, you can reference anything you want to be as a triggering point in your log; it could be the source IP or a specific tag. You can find more configurable references in the documentation below:
That being said, I would advise you to keep your base rules separated from the correlation rule to keep the ruleset file cleaner for proper management. Once you sought out matching the right logs to each rule, then you can look at correlation. One step at a time.
I hope the above provides the right guideline, please let me know if you require further assistance on this.