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

Add --exclude=<file>,<file> argument to skip files #64

Open
kwbtdisk opened this issue May 15, 2019 · 7 comments
Open

Add --exclude=<file>,<file> argument to skip files #64

kwbtdisk opened this issue May 15, 2019 · 7 comments

Comments

@kwbtdisk
Copy link

https://wordpress.slack.com/archives/C02RP4T41/p1557867276075100
I will make a PR if this would be useful for everyone 😎

Purpose

  • (In my case) I wanted to ignore ./readme.html file cos we have always deleted the file
  • And other cases like some files/dirs are moved by the security or management reason

An option

# Proposal
wp core verify-checksums --ignore-files='readme.html wp-includes/some-filename.php'

I would be happy if someone kindly suggests it should be --ignore-files or --skip-files or --excludes.

@R33D3M33R
Copy link

Hello,

I think this is a great idea, but I would wish it would be implemented more universally for verify-checksums. So, not only for core, but also for plugins and any other thing which uses this command.

Thus the argument should be more universally named (--exclude?) and it should IMHO follow the current coding style: a comma separated list of items (file names or plugin slugs).

Best regards,
Andrej

@Austinb
Copy link

Austinb commented Jun 24, 2019

Any chance someone has already worked on this? Helping a client manage their wordpress installations more automatically and they want to reinstall wordpress installs that fail verification. Since the readme.html is either deleted or renamed this check almost always fails and results in extra work reinstalling the wordpress core. Would like to be able to ignore readme.html from being verified.

I can give it a shot if no one has time. Seems pretty simple to add another arg to the core command and then add the necessary logic during the file loop.

@kwbtdisk
Copy link
Author

Woops sorry I didn't check this thread. @Austinb Have you started working on this? If not, let me take this 😃

@Austinb
Copy link

Austinb commented Jun 28, 2019

@kwbtdisk Please feel free if you have the time. I have not had any block of time to sit down and hammer it out. The issue is not a big one right now but will be for my client once we have other aspects completed.

@austinginder
Copy link

austinginder commented Jul 6, 2022

+1 highly agree. Would like to schedule wp core verify-checksums as part of regular security scans however I'd prefer to ignore if readme.html and wp-config-sample.php files are deleted.

Current behavior is:

wp core verify-checksums
Warning: File doesn't exist: wp-config-sample.php
Error: WordPress installation doesn't verify against checksums.

Maybe something like this with a repeatable argument for many files?

wp core verify-checksums --skip-files=wp-config-sample.php --skip-files=readme.html
Success: WordPress installation verifies against checksums.

@danielbachhuber danielbachhuber changed the title [Enhancement idea] Add an option to skip files Add --exclude=<file>,<file> argument to skip files Sep 7, 2023
@danielbachhuber
Copy link
Member

I guess I'd be fine with an --exclude= argument that accepts one or more comma-separated files, as long as there aren't any security issues associated with it.

@iDschepe
Copy link
Contributor

Would like to work on it.

ethicaladitya pushed a commit to ethicaladitya/checksum-command that referenced this issue Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants