Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twine-upload: add a nudge for password auth #190

Merged
merged 2 commits into from Nov 29, 2023

Conversation

woodruffw
Copy link
Member

Adds a nudge to accompany the pre-existing trusted publishing nudge.

Closes #187.

Copy link

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Will! Looks great, had a few suggestions:

twine-upload.sh Outdated
PASSWORD_DEPRECATION_NUDGE="::warning title=Password-based uploads deprecated::\
Starting in 2024, PyPI will require all users to enable Two-Factor \
Authentication. This will consequently require all users to switch \
to either API tokens or Trusted Publishers (preferred) for package \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is GitHub Actions we're warning in, let's put Trusted Publishers only, similar to the "Trusted Publishers" nudge? (Do we have a link to API keys for folks using reusable workflows in the TP docs?)

Also, is this message worthy of an ::error? Does that message type fail a run or only make the message red?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is GitHub Actions we're warning in, let's put Trusted Publishers only, similar to the "Trusted Publishers" nudge? (Do we have a link to API keys for folks using reusable workflows in the TP docs?)

Yeah, this was my only lingering concern -- by nudging TP only, we might confuse some users of reusable workflows who can't switch yet.

The reusable workflow limitation is documented, but not super prominently: https://docs.pypi.org/trusted-publishers/troubleshooting/#reusable-workflows-on-github

So TL;DR no strong opinion from me -- if you'd rather not mention API tokens here that SGTM, but we should probably be prepared for a ~few users being confused 🙂

Also, is this message worthy of an ::error? Does that message type fail a run or only make the message red?

I believe it just makes the message red, so ::error works for me!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, this completely fell off my stack. Making these suggested changes now!

Signed-off-by: William Woodruff <william@trailofbits.com>
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @woodruffw and @sethmlarson!

@webknjaz webknjaz merged commit 2fa448a into pypa:unstable/v1 Nov 29, 2023
2 checks passed
@woodruffw woodruffw deleted the ww/warn-password-auth branch November 29, 2023 07:16
renovate bot added a commit to allenporter/pyrainbird that referenced this pull request Nov 30, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[pypa/gh-action-pypi-publish](https://togithub.com/pypa/gh-action-pypi-publish)
| action | patch | `v1.8.10` -> `v1.8.11` |

---

### Release Notes

<details>
<summary>pypa/gh-action-pypi-publish
(pypa/gh-action-pypi-publish)</summary>

###
[`v1.8.11`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.8.11)

[Compare
Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.8.10...v1.8.11)

#### 💅 Cosmetic output improvements

[@&#8203;woodruffw](https://togithub.com/woodruffw) added a nudge
suggesting the users storing passwords in a GitHub Actions repository
secrets to switch to using secretless publishing in
[pypa/gh-action-pypi-publish#190.
This also reminds people that PyPI will start mandating two-factor
authentication to perform uploads in 2024.

#### 📝 What's Documented

[@&#8203;di](https://togithub.com/di) linked the configuration docs for
Trusted Publishing in README via
[pypa/gh-action-pypi-publish#179.

#### 🛠️ Internal dependencies

- Cryptography was bumped from 41.0.3 to 41.0.6
@&#[pypa/gh-action-pypi-publish#194
- Pip was bumped from 22.3.1 to 23.3
@&#[pypa/gh-action-pypi-publish#189
- pre-commit linters got autoupdated
@&#[pypa/gh-action-pypi-publish#184
- Urllib3 was bumped from 2.0.3 to 2.0.7
@&#[pypa/gh-action-pypi-publish#183

#### 💪 New Contributors

- [@&#8203;di](https://togithub.com/di) made their first contribution in
[pypa/gh-action-pypi-publish#179

**:mirror: Full Diff**:
pypa/gh-action-pypi-publish@v1.8.10...v1.8.11

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/allenporter/pyrainbird).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to allenporter/flux-local that referenced this pull request Nov 30, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[pypa/gh-action-pypi-publish](https://togithub.com/pypa/gh-action-pypi-publish)
| action | patch | `v1.8.10` -> `v1.8.11` |

---

### Release Notes

<details>
<summary>pypa/gh-action-pypi-publish
(pypa/gh-action-pypi-publish)</summary>

###
[`v1.8.11`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.8.11)

[Compare
Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.8.10...v1.8.11)

#### 💅 Cosmetic output improvements

[@&#8203;woodruffw](https://togithub.com/woodruffw) added a nudge
suggesting the users storing passwords in a GitHub Actions repository
secrets to switch to using secretless publishing in
[pypa/gh-action-pypi-publish#190.
This also reminds people that PyPI will start mandating two-factor
authentication to perform uploads in 2024.

#### 📝 What's Documented

[@&#8203;di](https://togithub.com/di) linked the configuration docs for
Trusted Publishing in README via
[pypa/gh-action-pypi-publish#179.

#### 🛠️ Internal dependencies

- Cryptography was bumped from 41.0.3 to 41.0.6
@&#[pypa/gh-action-pypi-publish#194
- Pip was bumped from 22.3.1 to 23.3
@&#[pypa/gh-action-pypi-publish#189
- pre-commit linters got autoupdated
@&#[pypa/gh-action-pypi-publish#184
- Urllib3 was bumped from 2.0.3 to 2.0.7
@&#[pypa/gh-action-pypi-publish#183

#### 💪 New Contributors

- [@&#8203;di](https://togithub.com/di) made their first contribution in
[pypa/gh-action-pypi-publish#179

**:mirror: Full Diff**:
pypa/gh-action-pypi-publish@v1.8.10...v1.8.11

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/allenporter/flux-local).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
michaelkedar pushed a commit to google/osv.dev that referenced this pull request Jan 9, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| gaurav-nelson/github-action-markdown-link-check | action | digest |
`a996638` -> `0f074c8` |
| [github/codeql-action](https://togithub.com/github/codeql-action) |
action | minor | `v2.21.9` -> `v2.23.0` |
| [ossf/scorecard-action](https://togithub.com/ossf/scorecard-action) |
action | minor | `v2.2.0` -> `v2.3.1` |
|
[pypa/gh-action-pypi-publish](https://togithub.com/pypa/gh-action-pypi-publish)
| action | patch | `v1.8.10` -> `v1.8.11` |

---

### Release Notes

<details>
<summary>github/codeql-action (github/codeql-action)</summary>

###
[`v2.23.0`](https://togithub.com/github/codeql-action/compare/v2.22.12...v2.23.0)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.12...v2.23.0)

###
[`v2.22.12`](https://togithub.com/github/codeql-action/compare/v2.22.11...v2.22.12)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.11...v2.22.12)

###
[`v2.22.11`](https://togithub.com/github/codeql-action/compare/v2.22.10...v2.22.11)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.10...v2.22.11)

###
[`v2.22.10`](https://togithub.com/github/codeql-action/compare/v2.22.9...v2.22.10)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.9...v2.22.10)

###
[`v2.22.9`](https://togithub.com/github/codeql-action/compare/v2.22.8...v2.22.9)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.8...v2.22.9)

###
[`v2.22.8`](https://togithub.com/github/codeql-action/compare/v2.22.7...v2.22.8)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.7...v2.22.8)

###
[`v2.22.7`](https://togithub.com/github/codeql-action/compare/v2.22.6...v2.22.7)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.6...v2.22.7)

###
[`v2.22.6`](https://togithub.com/github/codeql-action/compare/v2.22.5...v2.22.6)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.5...v2.22.6)

###
[`v2.22.5`](https://togithub.com/github/codeql-action/compare/v2.22.4...v2.22.5)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.4...v2.22.5)

###
[`v2.22.4`](https://togithub.com/github/codeql-action/compare/v2.22.3...v2.22.4)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.3...v2.22.4)

###
[`v2.22.3`](https://togithub.com/github/codeql-action/compare/v2.22.2...v2.22.3)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.2...v2.22.3)

###
[`v2.22.2`](https://togithub.com/github/codeql-action/compare/v2.22.1...v2.22.2)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.1...v2.22.2)

###
[`v2.22.1`](https://togithub.com/github/codeql-action/compare/v2.22.0...v2.22.1)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.22.0...v2.22.1)

###
[`v2.22.0`](https://togithub.com/github/codeql-action/compare/v2.21.9...v2.22.0)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.21.9...v2.22.0)

</details>

<details>
<summary>ossf/scorecard-action (ossf/scorecard-action)</summary>

###
[`v2.3.1`](https://togithub.com/ossf/scorecard-action/releases/tag/v2.3.1)

[Compare
Source](https://togithub.com/ossf/scorecard-action/compare/v2.3.0...v2.3.1)

#### What's Changed

- 🌱 Bump github.com/ossf/scorecard/v4 from v4.13.0 to v4.13.1
by [@&#8203;spencerschrock](https://togithub.com/spencerschrock) in
[ossf/scorecard-action#1282
- Adds additional Fuzzing detection and fixes a SAST bug related to
detecting CodeQL. For a full changelist of what this includes, see the
[v4.13.1](https://togithub.com/ossf/scorecard/releases/tag/v4.13.1)
release notes

**Full Changelog**:
ossf/scorecard-action@v2.3.0...v2.3.1

###
[`v2.3.0`](https://togithub.com/ossf/scorecard-action/releases/tag/v2.3.0)

[Compare
Source](https://togithub.com/ossf/scorecard-action/compare/v2.2.0...v2.3.0)

#### What's Changed

- 🌱 Bump github.com/ossf/scorecard/v4 from v4.11.0 to v4.13.0
by [@&#8203;spencerschrock](https://togithub.com/spencerschrock) in
[ossf/scorecard-action#1270
- For a full changelist of what this includes, see the
[v4.12.0](https://togithub.com/ossf/scorecard/releases/tag/v4.12.0) and
[v4.13.0](https://togithub.com/ossf/scorecard/releases/tag/v4.13.0)
release notes
- ✨ Send rekor tlog index to webapp when publishing results by
[@&#8203;spencerschrock](https://togithub.com/spencerschrock) in
[ossf/scorecard-action#1169
- 🐛 Prevent url clipping for GHES instances by
[@&#8203;rajbos](https://togithub.com/rajbos) in
[ossf/scorecard-action#1225

##### Documentation

- 📖 Update access rights needed to see the results in code scanning
by [@&#8203;rajbos](https://togithub.com/rajbos) in
[ossf/scorecard-action#1229
- 📖 Add package comments. by
[@&#8203;spencerschrock](https://togithub.com/spencerschrock) in
[ossf/scorecard-action#1221
- 📖 Add SECURITY.md file by
[@&#8203;david-a-wheeler](https://togithub.com/david-a-wheeler) in
[ossf/scorecard-action#1250
- 📖 Fix typo in token input docs by
[@&#8203;aabouzaid](https://togithub.com/aabouzaid) in
[ossf/scorecard-action#1258

#### New Contributors

- [@&#8203;david-a-wheeler](https://togithub.com/david-a-wheeler) made
their first contribution in
[ossf/scorecard-action#1250
- [@&#8203;aabouzaid](https://togithub.com/aabouzaid) made their first
contribution in
[ossf/scorecard-action#1258

**Full Changelog**:
ossf/scorecard-action@v2.2.0...v2.3.0

</details>

<details>
<summary>pypa/gh-action-pypi-publish
(pypa/gh-action-pypi-publish)</summary>

###
[`v1.8.11`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.8.11)

[Compare
Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.8.10...v1.8.11)

#### 💅 Cosmetic output improvements

[@&#8203;woodruffw](https://togithub.com/woodruffw) added a nudge
suggesting the users storing passwords in a GitHub Actions repository
secrets to switch to using secretless publishing in
[pypa/gh-action-pypi-publish#190.
This also reminds people that PyPI will start mandating two-factor
authentication to perform uploads in 2024.

#### 📝 What's Documented

[@&#8203;di](https://togithub.com/di) linked the configuration docs for
Trusted Publishing in README via
[pypa/gh-action-pypi-publish#179.

#### 🛠️ Internal dependencies

- Cryptography was bumped from 41.0.3 to 41.0.6
@&#[pypa/gh-action-pypi-publish#194
- Pip was bumped from 22.3.1 to 23.3
@&#[pypa/gh-action-pypi-publish#189
- pre-commit linters got autoupdated
@&#[pypa/gh-action-pypi-publish#184
- Urllib3 was bumped from 2.0.3 to 2.0.7
@&#[pypa/gh-action-pypi-publish#183

#### 💪 New Contributors

- [@&#8203;di](https://togithub.com/di) made their first contribution in
[pypa/gh-action-pypi-publish#179

**:mirror: Full Diff**:
pypa/gh-action-pypi-publish@v1.8.10...v1.8.11

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on wednesday" in timezone
Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/google/osv.dev).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEyNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
jooola pushed a commit to ansible-community/molecule-hetznercloud that referenced this pull request Feb 8, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[pypa/gh-action-pypi-publish](https://togithub.com/pypa/gh-action-pypi-publish)
| action | patch | `v1.8.10` -> `v1.8.11` |

---

### Release Notes

<details>
<summary>pypa/gh-action-pypi-publish
(pypa/gh-action-pypi-publish)</summary>

###
[`v1.8.11`](https://togithub.com/pypa/gh-action-pypi-publish/releases/tag/v1.8.11)

[Compare
Source](https://togithub.com/pypa/gh-action-pypi-publish/compare/v1.8.10...v1.8.11)

#### 💅 Cosmetic output improvements

[@&#8203;woodruffw](https://togithub.com/woodruffw) added a nudge
suggesting the users storing passwords in a GitHub Actions repository
secrets to switch to using secretless publishing in
[pypa/gh-action-pypi-publish#190.
This also reminds people that PyPI will start mandating two-factor
authentication to perform uploads in 2024.

#### 📝 What's Documented

[@&#8203;di](https://togithub.com/di) linked the configuration docs for
Trusted Publishing in README via
[pypa/gh-action-pypi-publish#179.

#### 🛠️ Internal dependencies

- Cryptography was bumped from 41.0.3 to 41.0.6
@&#[pypa/gh-action-pypi-publish#194
- Pip was bumped from 22.3.1 to 23.3
@&#[pypa/gh-action-pypi-publish#189
- pre-commit linters got autoupdated
@&#[pypa/gh-action-pypi-publish#184
- Urllib3 was bumped from 2.0.3 to 2.0.7
@&#[pypa/gh-action-pypi-publish#183

#### 💪 New Contributors

- [@&#8203;di](https://togithub.com/di) made their first contribution in
[pypa/gh-action-pypi-publish#179

**:mirror: Full Diff**:
pypa/gh-action-pypi-publish@v1.8.10...v1.8.11

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/ansible-community/molecule-hetznercloud).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@@ -40,6 +40,13 @@ INPUT_VERIFY_METADATA="$(get-normalized-input 'verify-metadata')"
INPUT_SKIP_EXISTING="$(get-normalized-input 'skip-existing')"
INPUT_PRINT_HASH="$(get-normalized-input 'print-hash')"

PASSWORD_DEPRECATION_NUDGE="::error title=Password-based uploads deprecated::\
Starting in 2024, PyPI will require all users to enable Two-Factor \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@woodruffw FYI looks like it's time to drop that future tense from the error message. So I filed #233 for when somebody gets to it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Progress! 😄

I'll go ahead and do it now, since it's a tiny change 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: warn the user on user/password pair use
3 participants