As an extension of earlier work on QED, we construct a BRST-invariant Lagrangian for SU(N) Yang–Mills theory with fundamental matter, regulated by the inclusion of massive Pauli–Villars (PV) gluons and PV quarks. The underlying gauge symmetry for massless PV gluons is generalized to accommodate the PV-index-changing currents that are required by the regularization. Auxiliary adjoint scalars are used, in a mechanism due to Stueckelberg, to attribute mass to the PV gluons and the PV quarks. The addition of Faddeev–Popov ghosts then establishes a residual BRST symmetry. Although there are drawbacks to the approach, in particular the computational load of a large number of PV fields and a nonlocal interaction of the ghost fields, this formulation could provide a foundation for renormalizable nonperturbative solutions of light-front QCD in an arbitrary covariant gauge.