Many jobs with the federal goverment will say 'for US citizens only, non-citizens authorized to work may be hired if the director of xyz certifies that the skills of the non-citizen are required for the position' or something of that nature.
No crime in applying for a job. I wouldn't bank on succeeding, unless you really have something that uniquely qualifies you for a particular position.
Only those jobs that require a security clearance will have a "US citizen only" requirement since only US citizens can get a security clearance. All other jobs (with some exceptions like civil service jobs) are open to green card holders.