Earlier this year, a passenger was standing on the jet bridge, moments from boarding his South African Airways flight, when an obstacle appeared in the shape of a Customs and Border Protection officer. During the random search at Washington Dulles International Airport, the law enforcer asked the man how much money he was carrying. He responded $500, normally not an amount an officer would question, except in one instance — when it’s a lie.

After digging a little deeper, the officer discovered $13,000 in the man’s luggage. In addition to fibbing, the traveler had also broken the law by not declaring funds exceeding $10,000. Needless to say, he missed his flight and the agency seized his cash.

The moral of the story: Tell CBP exactly what you are carrying, down to the sleeve of nuts in your coat pocket.

“To be safe, it’s better to declare it than have to pay a fine,” said Patrick Orender, the agency’s assistant port director at Dulles.

More than 25,000 CBP officers and agriculture specialists protect hundreds of sea, air and land portals against invaders. Thousands of undesirable items attempt to sneak into the country daily. Many hitch a ride on edible souvenirs purchased by unassuming tourists; others arrive through nefarious means orchestrated by smugglers. On a typical day last year, officials unearthed 352 pests; 4,638 quarantined items of the plant, meat, animal by-product and soil varieties; $265,205 in undeclared or illicit currency; and $3.3 million worth of products that violated intellectual-property rights.

Of the three categories the CBP oversees, two are straightforward: Don’t buy counterfeit goods, including that obviously fake Gucci bag from Shanghai, and always inform an officer if you are carrying 10 grand or more into or out of the country. The regulations on flora and fauna, however, come with a few asterisks.

The list of prohibited items is long and involved. For instance, Yorkshire pudding made with suet or animal fat is not allowed into the United States from Britain because of the fear of foot-and-mouth disease and bovine spongiform encephalopathy (commonly known as mad cow disease). But the stuffed pastry sans farm critters is allowed into Yankee territory. In addition, the greenlit map for one food might resemble a puzzle with large missing sections. Take pork, for instance. The agency only accepts commercially packaged and clearly labeled porcine products from Iceland, Australia, Canada and Fiji, as well as some specialty cured hams and pork delicacies produced in preapproved facilities in Italy and Spain. Or bananas. Caribbean vacationers can bring the fruit back from Jamaica, the Dominican Republic, Barbados and the Bahamas as long as the inspector can establish its place of origin. A foodstuff’s status can also change weekly, depending on the rise and fall of disease outbreaks and pest infestations. You don’t need to memorize the CBP catalogue, but you really must share your purchases with an officer.

“Your job is not to know what is allowed,” agriculture specialist Valerie Woo said. “Your job is to tell me what you have, so I can tell you if it’s allowed.”

If you are worried that the act of declaring will automatically result in the agony of relinquishing, it won’t. If the officer deems the product safe, you can enter the country with it. However, if you knowingly flout the rules, the agency could slap you with a fine of $300 (first offender) to $10,000 (major violator) and revoke your Global Entry privileges.

“If you do not declare an apple,” Orender said, “you could lose” your membership in the trusted-traveler program.

The regulations are based on real threats. Plants and animals can harbor bugs and diseases. See Itchy Exhibit A: the “crazy ant,” a stowaway that reached the United States on a shipment processed at the port of New Orleans in the 1900s. One of the most worrisome insects these days is the khapra beetle, which burrows into rice and other dried goods, such as peas and lentils, from India, Egypt and Morocco, among other destinations. If the pest entered the country, it could decimate the wheat and grain industry. Counterfeit goods, meanwhile, siphon profits from the original manufacturer and support an unsavory underworld.

“Knockoff items hurt the economy and put the consumer in danger, because they are made under conditions that are not regulated,” Orender said. “You also don’t know what you’re funding — sex trafficking, terrorism. Why fund the bad guys?”

Orender said the agency sees a rise in fake goods before major sporting events such as the National Football League’s Super Bowl and the National Hockey League’s Stanley Cup playoffs, as well as over the holidays, when wish lists to Santa include coveted footwear and designer bags and scents.

“Over Christmas, we see an uptick in perfumes and purses,” he said.

In December, the agency intercepted several hundred knockoff pairs of Nike Air Jordans from Hong Kong, which the manifest described as car parts. A few years ago, the department noticed a surge in hoverboards made with counterfeit components, including batteries that were catching on fire.

“Don’t risk getting knocked off by knockoffs,” Orender said.

Passengers who declare their goods must go to a secondary screening area for inspection. To catch the undeclared, officers and their canine colleagues roam the baggage-claim area and hallway leading to the exit. Agriculture specialist Jennifer Jones said she and her colleague, Beazley the beagle, typically root out 10 to 12 items a day.

On a quiet weekday afternoon in March, Woo was standing by a buffet of contraband assembled on a long metal table. The spread included almonds in their husks, cherries and fried animal skins from Vietnam, plus eru (a green often used in soup) and eggplants from West Africa.

“We see these crawling with pests,” she said of the eggplants.

Woo turned her attention to a piece of red luggage that had arrived a day after its owner. From the main compartment, she extracted a plastic sack filled with apples, mangoes and several grass brooms from West Africa. Her face lit up like a kid who had found a quarter in the couch cushions.

“I can see the difference I am making. All this,” she said, sweeping her hands over the treasures. “This is the difference I am making.”

I asked Woo about the most memorable — or shocking — object she has ever inspected.

“A mummified llama fetus,” she answered, sharing a four-year-old image of the South American pack animal she keeps on her phone.

Woo said the traveler had received the object as a gift during a trip to Bolivia and was instructed to bury it in her yard to attract wealth and prosperity. The woman had wrapped the animal in cardboard and plastic, and laid it to rest on the bottom of her suitcase. Because of the risk of foot-and-mouth disease, Woo had to confiscate the llama, but the woman did not protest.

“She was not heartbroken,” Woo said.

Jones and Beazley have been working together for a year and, in that time, the pup has sniffed out enough meat to fill a butcher shop. Last September, the pair discovered 10 smoked cow legs — hoofs and all — from Vietnam.

“The passenger declared beef,” Jones said. “There were two and half cows in four suitcases!”

Beazley also sussed out horsemeat sausage from Kazakhstan while it was spinning around on the luggage carousel.

“Every day, I hear from people, ‘I learned the hard way,’ ” she said.

To dispose of the banned goods, the officers chop them up in an industrial grinder or burn them in an incinerator. Woo grabbed a hammer and chisel and started hacking away at a mango, which can contain a seed-boring weevil.

“It’s like a science-fiction horror scene,” Jones said, “when there is an adult bug in the seed.”

An airport worker appeared with an older mustachioed man in a wheelchair. His two bags rested on the table, awaiting inspection after a flight from El Salvador. Agnes Smith, an agriculture technician since 1999, zipped open the bags to expose a veritable pantry. She grabbed a piece of meat and tugged at the plastic wrap. She raised the small parcel to her nose and inhaled.

“This is beef,” she announced.

Next, she pulled out several corn tamales and six whole chickens. If they had been raw, the poultry would have followed the same path of destruction as the mangoes, eggplants, almonds and cherries. But this batch of birds was cooked.

“You are good to go,” she informed the man, welcoming both the traveler and his chickens into the United States.

More from Travel: