Advanced-Config

 view release on metacpan or  search on metacpan

t/config/28-sensitive.cfg  view on Meta::CPAN

# --------------------------------------------------------------------------
#
# Test Program   : t/28-sensitive_tests.t
#
# This File      : t/config/28-sensitive.cfg
#
# --------------------------------------------------------------------------
#
# This config file demonstrates that it can correctly detect which tags
# contains sensitive data.
#
# Each section should have the same list of tags, but their values may be
# different or the same.
#
# Each tag ends with a Y/N indicator on whether the code should think the
# value was sensitive or not.  If it doesn't end that way, it assumes they
# are not sensitive for this test program!
#
# --------------------------------------------------------------------------
# Exceptions:
#
# The 2 00_has_... tags are used for secondary tests with variables and
# decryption disabled.  Only the tags from "main" section are used for this.
#
# The encrypted-* tags are indirectly referenced via ${06_decode_y}.
#
# --------------------------------------------------------------------------
# NOTE:
#    There are a lot of indirect tests since they are sensitive to
#    various situations.  None of the other modifiers are so sensitive
#    to the tests being performed for these test cases.
# --------------------------------------------------------------------------

00_has_decryption = 06_decode_y 30_decode_y
00_has_variables  = 08_pig_n 09_cow_y 10_sheep_y 11_hen_y 12_rooster_y 13_cat_y 16_indirect_y 19_indirect_y 22_indirect_n 23_decode_y 25_indirect_y 26_indirect_y 27_indirect_n
encrypted-m       = So what?

01_tom_n      = one
02_dick_n     = two
03_harry_n    = three
04_password_y = four
05_hidden_y   = five                       # HIDE
06_decode_y   = 'g`ey}hhub`Q&"'        # DECRYPT
07_encode_y   = seven                      # ENCRYPT
08_pig_n      = ${01_tom_n}
09_cow_y      = ${04_password_y}-b
10_sheep_y    = ${05_hidden_y}-b
11_hen_y      = ${06_decode_y}-b
12_rooster_y  = ${07_encode_y}-b
13_cat_y      = ${01_tom_n} ${04_password_y} ${02_dick_n}
14_bird_n     = 15_eagle_y
15_eagle_y    = majestic                   # HIDE
16_indirect_y = ${!14_bird_n}-bird
17_dog_y      = 18_wolf_n                  # HIDE
18_wolf_n     = it's a wild dog
19_indirect_y = ${!17_dog_y}-!
20_bear_n     = 21_black_n
21_black_n    = It's black
22_indirect_n = ${!20_bear_n}?
23_decode_y   = ${19_indirect_y} ${06_decode_y} ${22_indirect_n} ${19_indirect_y}
24_help_n     = 06_decode_y
25_indirect_y = ${!24_help_n}-:)
26_indirect_y = ${!06_decode_y}
27_indirect_n = ${!01_tom_n}               # No such var!
28_zork_y     = sensitive
29_pork_n     = not-sensitive
30_decode_y   = 'Qi\0n Lrd|Wco
&"'        # DECRYPT

[ section 01 ]
00_has_decryption = ignored, not used
00_has_variables  = ignored, not used
encrypted-01      = So now what?

01_tom_n      = one 01
02_dick_n     = two 01
03_harry_n    = three 01
04_password_y = four 01
05_hidden_y   = five 01                    # HIDE
06_decode_y   = 'g`ey}hhu?-
&"'       # DECRYPT
07_encode_y   = seven 01                   # ENCRYPT
08_pig_n      = ${01_tom_n}-1
09_cow_y      = ${04_password_y}-1
10_sheep_y    = ${05_hidden_y}-1
11_hen_y      = ${06_decode_y}-1
12_rooster_y  = ${07_encode_y}-1
13_cat_y      = ${01_tom_n} ${04_password_y} ${02_dick_n}
14_bird_n     = 15_eagle_y
15_eagle_y    = majestic                   # HIDE
16_indirect_y = ${!14_bird_n}-bird
17_dog_y      = 18_wolf_n                  # HIDE
18_wolf_n     = it's a wild dog
19_indirect_y = ${!17_dog_y}-!
20_bear_n     = 21_black_n
21_black_n    = It's black
22_indirect_n = ${!20_bear_n}?
23_decode_y   = ${19_indirect_y} ${06_decode_y} ${22_indirect_n} ${19_indirect_y}
24_help_n     = 06_decode_y
25_indirect_y = ${!24_help_n}-:)
26_indirect_y = ${!06_decode_y}
27_indirect_n = ${!01_tom_n}               # No such var!
28_zork_y     = sensitive
29_pork_n     = not-sensitive
30_decode_y   = 'Qi\0n ]ujbJ/<Q&"'         # DECRYPT


# Everything in this section is sensitive due to the sections's name!
# So it ignores the "hint" in the tag's name for this section!
[ section password ]
00_has_decryption  = ignored, not used
00_has_variables   = ignored, not used
encrypted-password = Now what?

01_tom_n      = one p
02_dick_n     = two p
03_harry_n    = three p
04_password_y = four p
05_hidden_y   = five p                       # HIDE
06_decode_y   = 'g`ey}hhu}uugvg{Qs'  # DECRYPT
07_encode_y   = seven p                      # ENCRYPT
08_pig_n      = ${01_tom_n}-p
09_cow_y      = ${04_password_y}-p
10_sheep_y    = ${05_hidden_y}-p
11_hen_y      = ${06_decode_y}-p
12_rooster_y  = ${07_encode_y}-p
13_cat_y      = ${01_tom_n} ${04_password_y} ${02_dick_n}
14_bird_n     = 15_eagle_y
15_eagle_y    = majestic                     # HIDE
16_indirect_y = ${!14_bird_n}-bird
17_dog_y      = 18_wolf_n                    # HIDE
18_wolf_n     = it's a wild dog
19_indirect_y = ${!17_dog_y}-!
20_bear_n     = 21_black_n
21_black_n    = It's black
22_indirect_n = ${!20_bear_n}?
23_decode_y   = ${19_indirect_y} ${06_decode_y} ${22_indirect_n} ${19_indirect_y}
24_help_n     = 06_decode_y
25_indirect_y = ${!24_help_n}-:)
26_indirect_y = ${!06_decode_y}
27_indirect_n = ${!01_tom_n}                 # No such var!
28_zork_y     = sensitive
29_pork_n     = not-sensitive
30_decode_y   = 'Qi\0n OuuEs<Q&"'          # DECRYPT



( run in 3.128 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )