-
Notifications
You must be signed in to change notification settings - Fork 9
Hardened feature for importing answers from a JSON file #1027
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
Draft
nonprofittechy
wants to merge
12
commits into
main
Choose a base branch
from
answer-set-import-review
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e3eac36
Starting place-hardened security for imports
LemmaLegal 1935e34
Variable filtering to only allow variables that would show in the pla…
LemmaLegal 208645c
Additional hardening pass
LemmaLegal e5e72c1
PR pre-review pass, cleanup redundant code
LemmaLegal e710691
Fix docsig error
LemmaLegal 4c5b904
More cleanup
LemmaLegal 242dd22
Give authors more control
LemmaLegal 947eda3
Format YAML
LemmaLegal fedc432
Try to fix mocking breaking ci/cd
LemmaLegal aebc1fd
Merge branch 'main' into answer-set-import-review
LemmaLegal 2616f96
Address PR feedback
LemmaLegal ac64323
Merge remote-tracking branch 'origin/main' into answer-set-import-review
LemmaLegal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...ssemble/AssemblyLine/data/sources/answer_set_import_samples/malformed_trailing_comma.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "users_name": "Alex", | ||
| "city": "Boston", | ||
| } |
5 changes: 5 additions & 0 deletions
5
docassemble/AssemblyLine/data/sources/answer_set_import_samples/malicious_dunder_key.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "users_name": "Alex", | ||
| "__class__": "builtins.object", | ||
| "city": "Boston" | ||
| } |
7 changes: 7 additions & 0 deletions
7
docassemble/AssemblyLine/data/sources/answer_set_import_samples/malicious_internal_key.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "users_name": "Alex", | ||
| "_internal": { | ||
| "steps": 99 | ||
| }, | ||
| "city": "Boston" | ||
| } |
22 changes: 22 additions & 0 deletions
22
...le/AssemblyLine/data/sources/answer_set_import_samples/object_graph_playground_alias.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "users": { | ||
| "_class": "docassemble.playground1.al_general.ALPeopleList", | ||
| "instanceName": "users", | ||
| "object_type": { | ||
| "_class": "type", | ||
| "name": "docassemble.playground1.al_general.ALIndividual" | ||
| }, | ||
| "elements": [ | ||
| { | ||
| "_class": "docassemble.playground1.al_general.ALIndividual", | ||
| "instanceName": "users[0]", | ||
| "name": { | ||
| "_class": "docassemble.playground1.al_general.IndividualName", | ||
| "instanceName": "users[0].name", | ||
| "first": "Client", | ||
| "last": "Example" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } |
6 changes: 6 additions & 0 deletions
6
...emble/AssemblyLine/data/sources/answer_set_import_samples/object_graph_unknown_class.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "users": { | ||
| "_class": "docassemble.bad.Actor", | ||
| "instanceName": "users" | ||
| } | ||
| } |
45 changes: 45 additions & 0 deletions
45
...mble/AssemblyLine/data/sources/answer_set_import_samples/object_graph_with_reference.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "users": { | ||
| "_class": "docassemble.AssemblyLine.al_general.ALPeopleList", | ||
| "instanceName": "users", | ||
| "object_type": { | ||
| "_class": "type", | ||
| "name": "docassemble.AssemblyLine.al_general.ALIndividual" | ||
| }, | ||
| "elements": [ | ||
| { | ||
| "_class": "docassemble.AssemblyLine.al_general.ALIndividual", | ||
| "instanceName": "users[0]", | ||
| "name": { | ||
| "_class": "docassemble.base.util.IndividualName", | ||
| "instanceName": "users[0].name", | ||
| "first": "Client", | ||
| "last": "Example" | ||
| }, | ||
| "agent": { | ||
| "_class": "docassemble.AssemblyLine.al_general.ALIndividual", | ||
| "instanceName": "spouse" | ||
| }, | ||
| "custom_text": "notes", | ||
| "custom_float": 1.25, | ||
| "custom_dict": { | ||
| "_class": "docassemble.base.util.DADict", | ||
| "instanceName": "users[0].custom_dict", | ||
| "elements": { | ||
| "case": "A123" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "_class": "docassemble.AssemblyLine.al_general.ALIndividual", | ||
| "instanceName": "spouse", | ||
| "name": { | ||
| "_class": "docassemble.base.util.IndividualName", | ||
| "instanceName": "spouse.name", | ||
| "first": "Spouse", | ||
| "last": "Example" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.