SECTION 1. SHORT TITLE.

    This Act may be cited as the ``Drain the Swamp Act of 2017''.

SEC. 2. 5-YEAR POST-EMPLOYMENT BAN ON LOBBYING OF EXECUTIVE AND 
              LEGISLATIVE BRANCH BY ALL FORMER GOVERNMENT OFFICIALS.

    (a) 5-Year Post-Employment Ban on Lobbying of Executive and 
Legislative Branch.--
            (1) Lobbying by former executive branch officials.--
                    (A) In general.--Paragraph (1) of section 207(c) of 
                title 18, United States Code, is amended to read as 
                follows:
            ``(1) Restrictions.--
                    ``(A) In general.--In addition to the restrictions 
                set forth in subsections (a) and (b), any person who is 
                an officer or employee (including any special 
                Government employee) of the executive branch of the 
                United States (including an independent agency), who is 
                referred to in paragraph (2), and who, within 5 years 
                after the termination of his or her service or 
                employment as such officer or employee, knowingly 
                makes, with the intent to influence, any communication 
                to or appearance before any individual described in 
                subparagraph (B) on behalf of any other person (except 
                the United States) in connection with any matter on 
                which such other person seeks official action by such 
                individual, shall be punished as provided in section 
                216 of this title.
                    ``(B) Individuals described.--An individual 
                described in this subparagraph is any of the following:
                            ``(i) An officer or employee of the 
                        executive branch of the United States 
                        (including an independent agency).
                            ``(ii) A Member of Congress.
                            ``(iii) An elected officer of the Senate or 
                        an employee of the Senate.
                            ``(iv) An elected officer of the House of 
                        Representatives or an employee of the House of 
                        Representatives.
                            ``(v) An employee of any other legislative 
                        office of the Congress.''.
                    (B) Description of former executive branch 
                officials subject to ban.--Subparagraph (A) of section 
                207(c)(2) of such title is amended--
                            (i) by striking ``or'' at the end of clause 
                        (iv);
                            (ii) by striking the period at the end of 
                        clause (v) and inserting ``; or''; and
                            (iii) by adding at the end the following 
                        new clauses:
                    ``(vi) serves in the position of Vice President of 
                the United States;
                    ``(vii) is employed in a position in the executive 
                branch of the United States (including any independent 
                agency) at a rate of pay payable for level I of the 
                Executive Schedule or employed in a position in the 
                Executive Office of the President at a rate of pay 
                payable for level II of the Executive Schedule; or
                    ``(viii) is appointed by the President to a 
                position under section 105(a)(2)(A) of title 3 or by 
                the Vice President to a position under section 
                106(a)(1)(A) of title 3.''.
                    (C) Elimination of separate 2-year ban for senior 
                executive branch officials.--Section 207 of such title 
                is amended by striking subsection (d).
                    (D) Conforming amendments.--Section 207 of such 
                title is amended--
                            (i) in subparagraph (A) of subsection 
                        (c)(2), by striking ``(other than a person 
                        subject to the restrictions of subsection 
                        (d))'';
                            (ii) by amending paragraph (3) of 
                        subsection (c) to read as follows:
            ``(3) Members of the independent payment advisory board.--
        Paragraph (1) shall apply to a member of the Independent 
        Payment Advisory Board under section 1899A of the Social 
        Security Act.'';
                            (iii) in paragraph (9) of subsection (e), 
                        by striking ``As used in this subsection'' and 
                        inserting ``As used in this section'';
                            (iv) in paragraph (1) of subsection (f), by 
                        striking ``subsection (c), (d), or (e)'' and 
                        inserting ``subsection (c) or (e)'';
                            (v) in subparagraph (A) of subsection 
                        (i)(1), by striking ``subsections (a), (c), and 
                        (d),'' and inserting ``subsections (a) and 
                        (c),'';
                            (vi) in subsection (j), by striking 
                        ``subsections (c), (d), and (e)'' each place it 
                        appears in paragraph (2), subparagraph (A) of 
                        paragraph (7), and subparagraph (B)(ii) of 
                        paragraph (7); and
                            (vii) in paragraph (5) of subsection (j), 
                        by striking ``subsections (a), (c), and (d)'' 
                        and inserting ``subsections (a) and (c)''.
            (2) Lobbying by former members and employees of congress 
        and other legislative branch officials.--
                    (A) In general.--Section 207(e) of such title is 
                amended by striking paragraphs (1) through (6) and 
                inserting the following:
            ``(1) Restrictions described.--
                    ``(A) In general.--Any person who is a covered 
                legislative branch official and who, within 5 years 
                after leaving office or the termination of his or her 
                service or employment as such an official, knowingly 
                makes, with the intent to influence, any communication 
                to or appearance before any individual described in 
                subparagraph (C) on behalf of any other person (except 
                the United States) in connection with any matter on 
                which such other person seeks official action by such 
                individual, shall be punished as provided in section 
                216 of this title.
                    ``(B) Covered legislative branch official 
                described.--In this paragraph, a `covered legislative 
                branch official' is any of the following individuals:
                            ``(i) A Member of Congress.
                            ``(ii) An elected officer of the Senate or 
                        an elected officer of the House of 
                        Representatives.
                            ``(iii) An employee of the Senate or an 
                        employee of the House of Representatives to 
                        whom paragraph (2)(A) applies.
                            ``(iv) An employee of any other legislative 
                        office of the Congress to whom paragraph (2)(B) 
                        applies.
                    ``(C) Individuals described.--An individual 
                described in this subparagraph is any of the following:
                            ``(i) An officer or employee of the 
                        executive branch of the United States 
                        (including an independent agency).
                            ``(ii) A Member of Congress.
                            ``(iii) An elected officer of the Senate or 
                        an employee of the Senate.
                            ``(iv) An elected officer of the House of 
                        Representatives or an employee of the House of 
                        Representatives.
                            ``(v) An employee of any other legislative 
                        office of the Congress.''.
                    (B) Conforming amendments.--Section 207(e) of such 
                title is amended--
                            (i) by redesignating paragraphs (7), (8), 
                        and (9) as paragraphs (2), (3), and (4);
                            (ii) in subparagraph (A) of paragraph (2) 
                        (as so redesignated), by striking ``The 
                        restrictions contained in paragraphs (2), (3), 
                        (4), and (5) apply only to acts by a former 
                        employee'' and inserting the following: ``The 
                        restrictions contained in paragraph (1) apply 
                        only to acts by a former employee of the Senate 
                        or a former employee of the House of 
                        Representatives'';
                            (iii) in subparagraph (B) of paragraph (2) 
                        (as so redesignated), by striking ``The 
                        restrictions contained in paragraph (6) apply 
                        only to acts by a former employee'' and 
                        inserting the following: ``The restrictions 
                        contained in paragraph (1) apply only to acts 
                        by a former employee of any other legislative 
                        office of the Congress''; and
                            (iv) in subparagraph (G) of paragraph (4) 
                        (as so redesignated), by striking ``any other 
                        agency, entity, or office in the legislative 
                        branch not covered by paragraph (1), (2), (3), 
                        (4), or (5) of this subsection'' and inserting 
                        the following: ``and any other officer or 
                        employee of the legislative branch who is not 
                        an employee of the House of Representatives or 
                        an employee of the Senate''.
    (b) Conforming Amendments to Other Post-Employment Restrictions.--
            (1) Switching sides on matters under official 
        responsibility.--Paragraph (2) of section 207(a) of such title 
        is amended--
                    (A) in the heading, by striking ``Two-year'' and 
                inserting ``5-year''; and
                    (B) by striking ``within 2 years'' and inserting 
                ``within 5 years''.
            (2) Representations in treaty or trade negotiations.--
        Paragraph (1) of section 207(b) of such title is amended by 
        striking ``for a period of 1 year'' and inserting ``for a 
        period of 5 years''.
            (3) Representation of foreign entities.--Paragraph (1) of 
        section 207(f) of such title is amended by striking ``within 1 
        year'' and inserting ``within 5 years''.
    (c) Effective Date.--The amendments made by this section shall 
apply with respect to any individual who, on or after the date of the 
enactment of this Act, leaves a position to which subsection (a), (b), 
(c), or (e) of section 207 of title 18, United States Code, as amended 
by this section, applies.

SEC. 3. LIFETIME BAN ON LOBBYING ON BEHALF OF FOREIGN GOVERNMENTS FOR 
              SENIOR EXECUTIVE BRANCH OFFICIALS.

    (a) Lifetime Ban.--Section 207(f) of title 18, United States Code, 
is amended--
            (1) by redesignating paragraph (3) as paragraph (4); and
            (2) by inserting after paragraph (2) the following new 
        paragraph:
            ``(3) Special rule for very senior personnel of the 
        executive branch and independent agencies.--
                    ``(A) Lifetime ban.--With respect to an individual 
                described in subparagraph (B), the restrictions 
                described in paragraph (1) shall apply to representing, 
                aiding, or advising foreign entities at any time after 
                the termination of that individual's service in a 
                position described in such subparagraph.
                    ``(B) Personnel described.--An individual described 
                in this subparagraph is any individual who--
                            ``(i) serves in the position of Vice 
                        President of the United States;
                            ``(ii) is employed in a position in the 
                        executive branch of the United States 
                        (including any independent agency) at a rate of 
                        pay payable for level I of the Executive 
                        Schedule or employed in a position in the 
                        Executive Office of the President at a rate of 
                        pay payable for level II of the Executive 
                        Schedule; or
                            ``(iii) is appointed by the President to a 
                        position under section 105(a)(2)(A) of title 3 
                        or by the Vice President to a position under 
                        section 106(a)(1)(A) of title 3.''.
    (b) Effective Date.--The amendments made by subsection (a) shall 
apply with respect to any individual who, on or after the date of the 
enactment of this Act, leaves a position to which section 207(f)(3) of 
title 18, United States Code, as added by subsection (a), applies.

SEC. 4. REVISIONS TO TYPES OF LOBBYING SUBJECT TO LOBBYING DISCLOSURE 
              ACT OF 1995.

    (a) Treatment of Consulting and Advising as Lobbying Activity.--
Section 3(7) of the Lobbying Disclosure Act of 1995 (2 U.S.C. 1602(7)) 
is amended by striking ``preparation and planning'' and inserting 
``consulting and advising, preparation and planning''.
    (b) Increase in Threshold for Qualification for Exemption From 
Lobbying Registration and Disclosure Requirements for Individuals 
Providing Limited Lobbying Services for Clients.--Section 3(10) of the 
Lobbying Disclosure Act of 1995 (2 U.S.C. 1602(10)) is amended by 
striking ``less than 20 percent of the time'' and inserting ``less than 
10 percent of the time''.
    (c) Effective Date.--The amendments made by this section shall 
apply with respect to lobbying contacts made on or after the date of 
the enactment of this Act.

SEC. 5. PROHIBITING SOLICITATION BY FOREIGN NATIONALS OF CAMPAIGN 
              CONTRIBUTIONS, EXPENDITURES, DISBURSEMENTS.

    (a) Prohibition.--Section 319(a)(1) of the Federal Election 
Campaign Act of 1971 (52 U.S.C. 30121(a)(1)) is amended by striking 
``to make'' each place it appears and inserting ``to make or solicit''.
    (b) Effective Date.--The amendments made by subsection (a) shall 
apply with respect to solicitations made on or after the date of the 
enactment of this Act.
Output: Drain the Swamp Act of 2017  This bill increases the ban on certain former executive branch officials, Members of Congress, and legislative staff within five years of termination of employment to knowingly make, with the intent to influence, any communication or appearance before an officer or employee of the executive branch, a Member of Congress or their staff, or any other legislative office on behalf of any other person (except the United States). The bill establishes penalties for such violations. The bill eliminates a similar two-year ban on certain senior executive branch officials. The bill creates a lifetime ban on certain senior personnel of the executive branch (including independent agencies) from representing, aiding, or advising foreign entities. The bill broadens the definition of lobbying activities in the Lobbying Disclosure Act of 1995 to also include consulting and advising. The bill amends the definition of lobbyist in the Lobbying Disclosure Act of 1995 to include individuals who spend at least 10% of their time engaged in lobbying services to one client in a 3-month period.  The scope of prohibitions on foreign nationals is expanded to include soliciting a contribution or donation in connection with a federal, state, or local election; to a political party; or for an electioneering communication.