Q. Would “secretary of homeland security” be lowercase in a sentence without that person’s name?
A. Just as you’d refer in Chicago style to a president of the United States or other country with a lowercase p (as in this sentence), you’d use a lowercase s when referring to a secretary of homeland security.
But note that the generic phrase “homeland security” (like “transportation,” “state,” and other such terms) becomes a proper noun when it refers to the administrative body—as in the Department of Homeland Security, or Homeland Security for short.
So you’d refer to the secretary of the US Department of Homeland Security. But this can get tricky: Does “homeland security” in “secretary of homeland security” refer to the department or only to the role? If in doubt, capitalize (“secretary of Homeland Security”). See also CMOS 8.22 and 8.63.
And before a name, secretary would be capitalized, as in US Homeland Security Secretary Alejandro Mayorkas, or Secretary Mayorkas.