Editor's note: Matt Maiocco is in Santa Clara Tuesday through Thursday for the 49ers’ three-day minicamp. Stay logged on to CSNBayArea.com and tune in nightly to SportsNet Central and Yahoo SportsTalk Live for comprehensive coverage.

SANTA CLARA – Coach Jim Harbaugh wrapped up the 49ers’ offseason program Thursday with some words of caution to his team.

After all, the 49ers have five weeks until the entire team is required to report back to the team's practice facility for the beginning of training camp.

The 49ers concluded a 55-minute practice, and then Harbaugh awarded T-shirts and certificates to 59 players who recorded perfect attendance throughout the nine-week offseason program.

Then, he had some advice about avoiding off-the-field issues.

“Beware with whom you associate,” Harbaugh said. “Very important to know your surroundings – friend or foe? And there always seems to be a foe present, so get in a good football position and be ready for anything that’s coming at you. And be able to around corners, and see under doors. Anticipate. Mainly, surround yourself with good people.”

It’s a message that resonates with 49ers quarterback Colin Kaepernick.

“You want to keep good people around at all times, regardless of where you’re at,” Kaepernick said.

He said the incident this offseason has made him “a lot more” cognizant of the bad intentions that others might have for him. But he said he has been on guard ever since rising to prominence during the 2012 season.

“Since I’ve really started playing, it’s something I’ve been more aware of, and especially in the past few months, it’s something obviously you have to be very aware of,” Kaepernick said.