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

Plugin Rules: WooCommerce #10

Open
PeterBooker opened this issue Feb 20, 2022 · 1 comment · May be fixed by #14
Open

Plugin Rules: WooCommerce #10

PeterBooker opened this issue Feb 20, 2022 · 1 comment · May be fixed by #14

Comments

@PeterBooker
Copy link
Contributor

PeterBooker commented Feb 20, 2022

WooCommerce creates the following tables:

+-------------------------------------------------+
| wp_actionscheduler_actions                      |
| wp_actionscheduler_claims                       |
| wp_actionscheduler_groups                       |
| wp_actionscheduler_logs                         |
| wp_wc_admin_note_actions                        |
| wp_wc_admin_notes                               |
| wp_wc_category_lookup                           |
| wp_wc_customer_lookup                           |
| wp_wc_download_log                              |
| wp_wc_order_coupon_lookup                       |
| wp_wc_order_product_lookup                      |
| wp_wc_order_stats                               |
| wp_wc_order_tax_lookup                          |
| wp_wc_product_meta_lookup                       |
| wp_wc_rate_limits                               |
| wp_wc_reserved_stock                            |
| wp_wc_tax_rate_classes                          |
| wp_wc_webhooks                                  |
| wp_woocommerce_api_keys                         |
| wp_woocommerce_attribute_taxonomies             |
| wp_woocommerce_downloadable_product_permissions |
| wp_woocommerce_log                              |
| wp_woocommerce_order_itemmeta                   |
| wp_woocommerce_order_items                      |
| wp_woocommerce_payment_tokenmeta                |
| wp_woocommerce_payment_tokens                   |
| wp_woocommerce_sessions                         |
| wp_woocommerce_shipping_zone_locations          |
| wp_woocommerce_shipping_zone_methods            |
| wp_woocommerce_shipping_zones                   |
| wp_woocommerce_tax_rate_locations               |
| wp_woocommerce_tax_rates                        |
+-------------------------------------------------+

Below are the tables which we probably want to anonymize.

MariaDB [wordpress]> SHOW COLUMNS FROM wordpress.wp_wc_admin_notes;
+---------------+---------------------+------+-----+---------------------+----------------+
| Field         | Type                | Null | Key | Default             | Extra          |
+---------------+---------------------+------+-----+---------------------+----------------+
| note_id       | bigint(20) unsigned | NO   | PRI | NULL                | auto_increment |
| name          | varchar(255)        | NO   |     | NULL                |                |
| type          | varchar(20)         | NO   |     | NULL                |                |
| locale        | varchar(20)         | NO   |     | NULL                |                |
| title         | longtext            | NO   |     | NULL                |                |
| content       | longtext            | NO   |     | NULL                |                |
| content_data  | longtext            | YES  |     | NULL                |                |
| status        | varchar(200)        | NO   |     | NULL                |                |
| source        | varchar(200)        | NO   |     | NULL                |                |
| date_created  | datetime            | NO   |     | 0000-00-00 00:00:00 |                |
| date_reminder | datetime            | YES  |     | NULL                |                |
| is_snoozable  | tinyint(1)          | NO   |     | 0                   |                |
| layout        | varchar(20)         | NO   |     |                     |                |
| image         | varchar(200)        | YES  |     | NULL                |                |
| is_deleted    | tinyint(1)          | NO   |     | 0                   |                |
| is_read       | tinyint(1)          | NO   |     | 0                   |                |
| icon          | varchar(200)        | NO   |     | info                |                |
+---------------+---------------------+------+-----+---------------------+----------------+

We should probably anonymize title, content and perhaps content_data?

MariaDB [wordpress]> SHOW COLUMNS FROM wordpress.wp_woocommerce_log;
+-----------+---------------------+------+-----+---------+----------------+
| Field     | Type                | Null | Key | Default | Extra          |
+-----------+---------------------+------+-----+---------+----------------+
| log_id    | bigint(20) unsigned | NO   | PRI | NULL    | auto_increment |
| timestamp | datetime            | NO   |     | NULL    |                |
| level     | smallint(4)         | NO   | MUL | NULL    |                |
| source    | varchar(200)        | NO   |     | NULL    |                |
| message   | longtext            | NO   |     | NULL    |                |
| context   | longtext            | YES  |     | NULL    |                |
+-----------+---------------------+------+-----+---------+----------------+

Developers might put personal data into logs, do we need to anonymize message?

The plugin also adds the following post types: product, product_variation, shop_order, shop_order_refund and shop_coupon. We would likely need to anonymize the post meta for shop_order and shop_order_refund?

@PeterBooker
Copy link
Contributor Author

[#14] contains a draft for a WooCommerce config.

@PeterBooker PeterBooker linked a pull request Mar 12, 2022 that will close this issue
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 a pull request may close this issue.

1 participant