Let $\rho : G \hookrightarrow \mathrm{GL}(n, \mathbf{F})$ be a representation of a finite group over the field $\mathbf{F}$ of characteristic $p$, and $h_{1}, \ldots ,h_{m} \in \mathbf{F}[V]^{G}$ invariant polynomials that form a regular sequence in $\mathbf{F}[V]$. In this note we introduce a tool to study the problem of whether they form a regular sequence in $\mathbf{F}[V]^{G}$. Examples show they need not. We define the cohomology of $G$ with coefficients in the Koszul complex \[ (\mathscr{K},\partial )=(\mathbf{F}[V]\bigotimes E(s^{-1}h_{1}, \ldots ,s^{-1}h_{n}), \partial (s^{-1}h_{i}:i=1,\ldots ,n), \] which we denote by $H^{*}(G;(\mathscr{K}, \partial ))$, and use it to study the homological codimension of rings of invariants of permutation representations of the cyclic group of order $p$, for $p \neq 0$, and to answer the above question in this case.