Psalm 18:23
"I was also upright before him, and I kept myself from mine iniquity."
Cross References (ranked by relevance)
Depart from evil, and do good; and dwell for evermore.
For the righteous LORD loveth righteousness; his countenance doth behold the upright.
The LORD render to every man his righteousness and his faithfulness; for the LORD delivered thee into my hand to day, but I would not stretch forth mine hand against the LORD’s anointed.
I know also, my God, that thou triest the heart, and hast pleasure in uprightness. As for me, in the uprightness of mine heart I have willingly offered all these things: and now have I seen with joy thy people, which are present here, to offer willingly unto thee.
Thou hast proved mine heart; thou hast visited me in the night; thou hast tried me, and shalt find nothing; I am purposed that my mouth shall not transgress.