Better yet, if your company employs H1-B visa holders, they are required by law to put up the job advertisement along with salary offered in a public area of the office.
This requirement is to give opportunity to existing employees for the new position.
In a small company of about 400 people, where I worked, the job advertisements were posted in the kitchen area and it wasn't very hard to deduce what the salary of the newly joining member of your team is.
A company only has to advertise these jobs if they are determined to be "H1-B dependent" (> 15% of employees are on that visa), or they need labor certification for a different form of visa (H2-B, E3).
This requirement is to give opportunity to existing employees for the new position.
In a small company of about 400 people, where I worked, the job advertisements were posted in the kitchen area and it wasn't very hard to deduce what the salary of the newly joining member of your team is.