  Recent cosmic-ray (CR) studies have claimed the possibility of an excess on
the antiproton flux over the predicted models at around $10$ GeV, which can be
the signature of dark matter annihilating into hadronic final states that
subsequently form antiprotons. However, this excess is subject to many
uncertainties related to the evaluation of the antiproton spectrum produced
from spallation interactions of CRs. In this work, we implement a combined
Markov-Chain Monte Carlo analysis of the secondary ratios of B, Be and Li and
the antiproton-to-proton ratio ($\bar{p}/p$), while also including nuisance
parameters to consider the uncertainties related to the spallation cross
sections. This study allows us to constrain the Galactic halo height and the
rest of propagation parameters, evaluate the impact of cross sections
uncertainties in the determination of the antiproton spectrum and test the
origin of the excess of antiprotons. In this way, we provide a set of
propagation parameters and scale factors for renormalizing the cross sections
parametrizations that allow us to reproduce all the ratios of B, Be, Li and
$\bar{p}$ simultaneously. We show that the energy dependence of the $\bar{p}/p$
ratio is compatible with a pure secondary origin. We find that the energy
dependence of the evaluated $\bar{p}/p$ spectrum matches the AMS-02 data at
energies above $\sim3$GeV, although there is still a nearly constant $\sim10\%$
excess of $\bar{p}$ over our prediction. We discuss that this discrepancy is
more likely explained from a $\sim10\%$ scaling in the cross sections of
antiproton production, rather than a component of dark matter leading to
antiprotons. In particular, we find that the best-fit WIMP mass ($\sim 300$
GeV) needed to explain the discrepancy lies above the constraints from most
indirect searches of dark matter and the resultant fit is poorer than with a
cross sections scaling.
