We provide a study of the supersymmetric Adler--Bardeen anomaly in the $N=1, d=4,6,10$ super-Yang--Mills theories. We work in the component formalism that includes shadow fields, for which Slavnov--Taylor identities can be independently set for both gauge invariance and supersymmetry. We find a method with improved descent equations for getting the solutions of the consistency conditions of both Slavnov--Taylor identities and finding the local field polynomials for the standard Adler--Bardeen anomaly and its supersymmetric counterpart. We give the explicit solution for the ten-dimensional case.