I'm a US citizen, and while my home address is in the US, I took advantage of my fully-remote job to travel to countries for extended periods, including a country that US considers an adversary (I was neither born nor have any family ties there). I didn't tell anyone at work. I didn't think it was necessary to do so, I thought it might raise some eyebrows, and because I generally keep my private life out of work anyways. I just did my work like normal, and whenever my location/timezone came up, I'd mention my official US address.
Fast forward to the present: I am back in the US with a different company and am about to start a new project that's been contracted by the government. It's not related to defense, aerospace, nuclear energy, etc. However, I'm still required to undergo a security clearance.
My criminal record and credit score are spotless. However, I'm concerned that my traveling to "undesirable" countries for long periods will cause problems. I've heard that a security clearance requires references from friends, family, and co-workers. So I'm also concerned that my references (particularly my former co-workers) will say I lived in the US the whole time since I never talked to them about it and never met them in-person. What should I say/do going forward?
There is likely some evidence that I was a resident of the other country: a lease (renting apartment), maybe a visa (but it was a tourist visa), credit card charges, perhaps.
The security clearance required is public trust.