GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Exclude hidden files by default by joshmgross · Pull Request #598 · actions/upload-artifact

Conversation

@joshmgross

@joshmgross joshmgross commented Aug 15, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Depends on Add glob option to ignore hidden files toolkit#1791
  • Upcoming breaking change: Hidden Files will be excluded by default #602

Currently, all files within the search path are uploaded into the artifact. This includes hidden files, which could contain sensitive values that should not be accessible outside of the workflow run. To enhance the default security of this action, this PR excludes hidden files from the path by default. Users who require hidden files have validated that there are no sensitive values in their artifacts can opt-in to uploading hidden files with the include-hidden-files input.

This is part of the following breaking change:

Exclude hidden files by default in Upload Artifact GitHub Actions
From September 2nd, 2024, we will no longer include hidden files and folders as part of the default upload of the v3 and v4 upload-artifact actions. This reduces the risk that credentials are accidentally uploaded into artifacts. Customers who need to continue to upload these files can use a new option, ‘include-hidden-files’, to continue to do so.
https://github.blog/changelog/2024-08-19-notice-of-upcoming-deprecations-and-breaking-changes-in-github-actions-runners/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rducom and 0xfeeddeadbeef reacted with thumbs up emoji bartekpacia, AlexSkrypnyk, neoye911, hynek, jacklul, wszarmach-koia, and PavelSilnaHealth reacted with thumbs down emoji
All reactions
  • 👍 2 reactions
  • 👎 7 reactions
@joshmgross
Exclude hidden files by default
cb6558b
joshmgross
joshmgross commented Aug 15, 2024
View reviewed changes
Comment thread merge/action.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

joshmgross
joshmgross commented Aug 15, 2024
View reviewed changes
Comment thread src/shared/search.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

joshmgross added 6 commits August 15, 2024 16:31
@joshmgross
lint
acb59e4
@joshmgross
Update to latest @actions/glob and fix tests
a0c40cf
@joshmgross
npm run release
0a398c1
@joshmgross
Update glob license
453e8d0
@joshmgross
Remove another trailing comma
3be2180
@joshmgross
npm run release again 🙂
3b315f2
@joshmgross
joshmgross marked this pull request as ready for review August 15, 2024 21:39
@joshmgross
joshmgross requested a review from a team as a code owner August 15, 2024 21:39
reemasardana
reemasardana reviewed Aug 15, 2024
View reviewed changes
Comment thread README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

konradpabjan
konradpabjan previously approved these changes Aug 15, 2024
View reviewed changes
Comment thread action.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread merge/action.yml Resolved

Uh oh!

There was an error while loading. Please reload this page.

SrRyan
SrRyan reviewed Aug 15, 2024
View reviewed changes
Comment thread README.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

joshmgross added 2 commits August 15, 2024 19:39
@joshmgross
Remove "merged" from include-hidden-files input description
710f362
@joshmgross
Add a warning about enabling include-hidden-files
d52396a
@joshmgross
joshmgross dismissed konradpabjan’s stale review via d52396a August 15, 2024 23:46
@joshmgross joshmgross mentioned this pull request Aug 16, 2024
Exclude the .git directory by default #599
Closed
SrRyan
SrRyan reviewed Aug 19, 2024
View reviewed changes
Comment thread docs/MIGRATION.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

SrRyan
SrRyan approved these changes Aug 19, 2024
View reviewed changes
@joshmgross joshmgross mentioned this pull request Aug 19, 2024
Upcoming breaking change: Hidden Files will be excluded by default #602
Closed
reemasardana
reemasardana reviewed Aug 20, 2024
View reviewed changes
Comment thread src/shared/search.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

reemasardana
reemasardana approved these changes Aug 20, 2024
View reviewed changes
@SrRyan SrRyan mentioned this pull request Aug 22, 2024
V3 backport: Exclude hidden files by default #604
Merged
casperdcl
casperdcl reviewed Aug 23, 2024
View reviewed changes
Comment thread dist/merge/index.js
continue;
}
// Hidden file or directory?
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {

@casperdcl casperdcl Aug 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

what about a few common things like gh-pages' .nojekyll and even .gitignore?

Suggested change
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\.(?!nojekyll$)/)) {

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@nebuk89 nebuk89 Aug 23, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thank you for the feedback, for now we are going to go ahead with the 'all in' option as starting to pick and choose common things is a risk we start to go back to 'too many' common things and expose folks to the risk of mistakes causing issues.
I get the idea though, maybe in the future we could look at 'more flags' for "all-common-none", but that will be something we need to revisit at a later date so we could get a better view on what common would be :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@casperdcl casperdcl Aug 23, 2024

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Well at least there should probably be a black/whitelist option rather than a bool methinks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@joshmgross joshmgross Aug 29, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

path is effectively that allowlist/denylist option - you can allow hidden files and then specify in path which to exclude

https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread dist/upload/index.js
continue;
}
// Hidden file or directory?
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {

@casperdcl casperdcl Aug 23, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

same here

Suggested change
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\.(?!nojekyll$)/)) {

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@joshmgross joshmgross Aug 29, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

See #598 (comment)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
konradpabjan
konradpabjan approved these changes Aug 23, 2024
View reviewed changes
robherley
robherley approved these changes Aug 27, 2024
View reviewed changes
@joshmgross
joshmgross merged commit 5076954 into main Aug 29, 2024
@avivkeller avivkeller mentioned this pull request Sep 1, 2024
meta: bump actions/upload-artifact from 4.3.4 to 4.4.0 nodejs/node#54703
Merged
@joshmgross joshmgross mentioned this pull request Sep 2, 2024
Add a section about hidden files #607
Merged
@bartekpacia

bartekpacia commented Sep 2, 2024

Copy link
Copy Markdown

This just broke my workflow. I think this warrants a breaking change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bartekpacia bartekpacia mentioned this pull request Sep 2, 2024
debug maestro-e2e-output not being present when tests fail mobile-dev-inc/Maestro#2007
Merged
@AlexSkrypnyk

AlexSkrypnyk commented Sep 2, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

This has just broke 1000s of workflows that rely on artifacts produced by tools like pcov/phpunit etc. and any other reporting tools.

This should have been released as a major version.

neoye911, bartekpacia, m-ibot, JP-Dhabolt, and PavelSilnaHealth reacted with thumbs up emoji
All reactions
  • 👍 5 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@neoye911

neoye911 commented Sep 3, 2024

Copy link
Copy Markdown

This has just broke 1000s of workflows that rely on artifacts produced by tools like pcov/phpunit etc. and any other reporting tools.

This should have been released as a major version.

Failed our release pipeline as well. Agree.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thomas-alias17

thomas-alias17 commented Sep 3, 2024

Copy link
Copy Markdown

Hey guys, even though this is definitely a good change, introducing a breaking change on a minor version isn't great.
Like the above comments, this also affected our company's workflows (including our production ones).
Please consider breaking changes on major versions next time 🙂

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@twm twm mentioned this pull request Sep 3, 2024
Fix coverage upload twisted/towncrier#667
Merged
@casperdcl

casperdcl commented Sep 3, 2024

Copy link
Copy Markdown

It's also likely extremely hard to debug for users. "Breaking" was included in #602's title so it's unforgivable to sneak this in a minor version.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@twm

twm commented Sep 3, 2024

Copy link
Copy Markdown

This change likely breaks every workflow that uploads the .coverage* files generated by coverage.py. This will have a significant impact in the Python ecosystem.

Did GitHub assess the number of (public) artifact uploads that would be affected by this change? I understand that avoiding upload of .git/config files containing credentials was the goal. Is forbidding the upload of any pathname beginning with . the lowest-impact way to achieve that aim?

Some other possibilities:

  1. Don't upload .git directories by default.
  2. Don't put credentials in .git/config by default.

The first option seems attractive to me, regardless of security implication, since the .git directory is redundant with the content of the Git repository. I struggle to envision a scenario where I would deliberately upload the .git directory.

The second option minimizes harm.

I must express my sympathy with all those who advocated for less impactful options, but did not prevail. Sadly, the OSS ecosystem must deal with the consequences.

bartekpacia and PavelSilnaHealth reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@casperdcl

casperdcl commented Sep 3, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

I'd still suggest reverting in a minor version and re-releasing in a major one regardless of implementation (#598, #599, #598 (comment), etc)

AlexSkrypnyk and m-ibot reacted with heart emoji
All reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nkraetzschmar added a commit to gardenlinux/package-build that referenced this pull request Sep 3, 2024
@nkraetzschmar
fix: add support for actions/upload-artifact#598
87ae8f7
@joshmgross
joshmgross deleted the joshmgross/exclude-hidden-files branch September 3, 2024 15:21
@joshmgross

joshmgross commented Sep 3, 2024

Copy link
Copy Markdown
Contributor Author

Please direct all feedback to the tracking issue #602

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@actions actions locked as off-topic and limited conversation to collaborators Sep 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@SrRyan SrRyan SrRyan approved these changes
+6 more reviewers
@crazy-max crazy-max crazy-max left review comments
@nebuk89 nebuk89 nebuk89 left review comments
@casperdcl casperdcl casperdcl left review comments
@konradpabjan konradpabjan konradpabjan approved these changes
@robherley robherley robherley approved these changes
@reemasardana reemasardana reemasardana approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

13 participants

@joshmgross @bartekpacia @AlexSkrypnyk @neoye911 @thomas-alias17 @casperdcl @twm @crazy-max @nebuk89 @konradpabjan @robherley @SrRyan @reemasardana
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.