Have you ever heard the phrase: "a grand jury would 'indict a ham sandwich,' if that's what you wanted"
The process of handing the gate agent a boarding pass in the name of another person is fraud or theft of services or any of a number of offenses you could be charged with. You may be looking for loopholes in the "stowaway" law, but it's real easy to charge you with any of the offenses I mentioned.