Many news reports on the Trump/Arlington kerfuffle mention that partisan political activity at the cemetery is "illegal", but fail to specify what laws are involved.
Among them:
32 CFR § 533.32(c) prohibits partisan political activity in conjunction with memorial services.
32 CFR § 533.33(c)(3) prohibits unauthorized speeches.
32 CFR § 533.33(c)(16) prohibits "disrespectful or disorderly conduct", presumably including shoving army officials.
These can be found at https://www.ecfr.gov/current/title-32/subtitle-A/chapter-V/subchapter-D/part-553