If I anchor a secure container in space can it be scanned down using combat probes? also how long will it last on space for until it vanishes (or will it stay there until removed?) and what is the largest container that can be anchored in space with a password
It cannot be scanned with combat probes. If you anchor them in a bad safe (inline between celestials) it can be located with some smart use of d-scan and bookmarks, but whoever is doing this must be really bored.
As far as I know, they stay anchored forever. (People use them for example to store extra POS fuel/stront. But there might be a difference between containers anchored in a FF and those outside.)
As far as I know they disappear after 30 days of not being accessed, though every time anyone accesses them (may require successful entry of password if you set one) the timer resets.