No provisions in any bond which is given pursuant to any provision of this chapter which attempts by contract to shorten the period which is prescribed for the commencement of an action on the bond by Section 337 of the Code of Civil Procedure, is valid if such provision attempts to limit the time for commencement of action on the bond to a shorter period than six months from the termination of the 35-day period which is covered by such bond.