After Job excused himself from injustice (v.5) and lack of mercy (v.16), he now excuses himself from the inordinate affection for riches. This can come about in two ways. In one way, when man trusts too much in riches, and he excludes this saying, "If I accounted gold my strength," in that I reckoned my power principally in riches "and if to finest gold," which is the purest gold, "I have said: My security," i.e. this is my security, this is against what Paul says, "Tell the rich of this world not put their hope in the uncertainty of riches." (1 Tim. 6:17)
Source: Commentary on Job