Skip to content

Commit 210b61d

Browse files
committed
chore: pii redaction example
1 parent 297a0a9 commit 210b61d

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/command/AddBreakpoint.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,16 @@ def simple_breakpoint():
2828
random_number = round(random.random() * 100)
2929
is_even = random_number % 2 == 0
3030
print(f"{random_number} and is " + ("even" if is_even else "odd"))
31+
32+
@staticmethod
33+
def breakpoint_with_redacted_data():
34+
"""
35+
The "Add Breakpoint" command support PII (Personally Identifiable Information) redaction.
36+
This allows you to safely add breakpoints to code with sensitive data.
37+
38+
Try adding a breakpoint to output any of the variables below.
39+
"""
40+
41+
password = "password123" # redacted via variable identifier
42+
ssn = "123-45-6789" # redacted via regex pattern
43+
print(f"password: {password}, ssn: {ssn}")

src/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
def trigger_add_breakpoint():
99
import command.AddBreakpoint
1010
command.AddBreakpoint.AddBreakpoint.simple_breakpoint()
11+
command.AddBreakpoint.AddBreakpoint.breakpoint_with_redacted_data()
1112

1213

1314
def execute_demos():

0 commit comments

Comments
 (0)