You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying out piicatcher on a AWS Linux machine . My installation method was docker.
I then installed locally postgresql and created a simple table.
CREATE TABLE scannerdb.contacts (
contact_id SERIAL PRIMARY KEY, -- Auto-incrementing ID
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
phone VARCHAR(25),
address VARCHAR(150),
city VARCHAR(50),
state VARCHAR(2), -- Consider using a longer field if storing full state names
zip_code VARCHAR(10),
birthdate DATE,
ssn VARCHAR(11) -- Consider encryption for this sensitive field
);
[root@ip-172-31-61-58 tokern]# piicatcher --log-scan detect --source-name scannerdb1 --scan-type metadata --include-schema scannerdb --list-all --no-incremental --include-table contacts
No columns were scanned. Ensure include/exclude patterns are correct OR no new columns have been added
It never returns anything. I have 2 rows in my database.
When i check the postgresql logs I see the connection made from piiscanner and the SQL runs to find the metadata is loged as the query run..
SELECT
current_database() as cluster,
st.schemaname as schema,
st.relname as name,
pgtd.description as description,
att.attname as col_name,
pgtyp.typname as col_type,
pgcd.description as col_description,
att.attnum as col_sort_order
FROM pg_catalog.pg_attribute att
INNER JOIN
pg_catalog.pg_statio_all_tables as st
on att.attrelid=st.relid
LEFT JOIN
pg_catalog.pg_type pgtyp
on pgtyp.oid=att.atttypid
LEFT JOIN
pg_catalog.pg_description pgtd
on pgtd.objoid=st.relid and pgtd.objsubid=0
LEFT JOIN
pg_catalog.pg_description pgcd
on pgcd.objoid=st.relid and pgcd.objsubid=att.attnum
WHERE att.attnum >=0 and
st.schemaname NOT IN ('information_schema', 'pg_catalog', 'pg_toast')
ORDER by cluster, schema, name, col_sort_order;
I expected to see the pii column names listed similar to the image on the home screen in my output.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying out piicatcher on a AWS Linux machine . My installation method was docker.
I then installed locally postgresql and created a simple table.
CREATE TABLE scannerdb.contacts (
contact_id SERIAL PRIMARY KEY, -- Auto-incrementing ID
first_name VARCHAR(50) NOT NULL,
last_name VARCHAR(50) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
phone VARCHAR(25),
address VARCHAR(150),
city VARCHAR(50),
state VARCHAR(2), -- Consider using a longer field if storing full state names
zip_code VARCHAR(10),
birthdate DATE,
ssn VARCHAR(11) -- Consider encryption for this sensitive field
);
I added this dummy table to the catalog
piicatcher catalog add-postgresql --name scannerdb1 --username postgres --password xxxxxxxx --database scannerdb --uri IP_PUT HERE --port 5432
And when I run the scan.
[root@ip-172-31-61-58 tokern]# piicatcher --log-scan detect --source-name scannerdb1 --scan-type metadata --include-schema scannerdb --list-all --no-incremental --include-table contacts
No columns were scanned. Ensure include/exclude patterns are correct OR no new columns have been added
It never returns anything. I have 2 rows in my database.
When i check the postgresql logs I see the connection made from piiscanner and the SQL runs to find the metadata is loged as the query run..
SELECT
current_database() as cluster,
st.schemaname as schema,
st.relname as name,
pgtd.description as description,
att.attname as col_name,
pgtyp.typname as col_type,
pgcd.description as col_description,
att.attnum as col_sort_order
FROM pg_catalog.pg_attribute att
INNER JOIN
pg_catalog.pg_statio_all_tables as st
on att.attrelid=st.relid
LEFT JOIN
pg_catalog.pg_type pgtyp
on pgtyp.oid=att.atttypid
LEFT JOIN
pg_catalog.pg_description pgtd
on pgtd.objoid=st.relid and pgtd.objsubid=0
LEFT JOIN
pg_catalog.pg_description pgcd
on pgcd.objoid=st.relid and pgcd.objsubid=att.attnum
WHERE att.attnum >=0 and
st.schemaname NOT IN ('information_schema', 'pg_catalog', 'pg_toast')
I expected to see the pii column names listed similar to the image on the home screen in my output.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions