"Basis" in a retirement plan is the amount of after-tax dollars that the taxpayer has contributed to the plan in after-tax dollars.
This is also called "cost" or "contribution".
Since contributions to a 401(k) plan in Pennsylvania are not excluded from income, by definition, all your contributions to the 401(k) plan are after-tax and part of your basis.
See the Pennsylvania website and another PA webpage here.