Add script review page #304
Reference in New Issue
Block a user
Delete Branch "feature/script-review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes !2
Added review dashboard button as well.
The script Name is a full path that is separated with dots and will be much longer than 'Script'. Example:
Was not missed during testing....
@@ -0,0 +412,4 @@// If policy is Replace, create new script firstif (selectedPolicy === PolicyType.Replace) {const createScriptResponse = await fetch('/v1/scripts', {The replacement script may already exist in the database. Is importing siphash 2-4 even an option? Should this be handled in the backend and just transparently return the existing ID?
That's a backend implementation detail. If the hash already exists it needs to just return the existing script id.
Will give it a shot. Going to attempt to make hash unique but I assume that's already blown up in the prod db:
da48d1390eI wrote a repair tool to do consistency check. I just ran it and there was no duplicates so hopefully should be good to push to prod
@@ -0,0 +431,4 @@const result = await createScriptResponse.json();toScriptID = result.ScriptID;}Replace action should also create an "Allowed" policy for the new script. This lets the validator auto-pass map fixes containing the new script.
2eb581705dI can't review the full thing at the moment. Compare to my review tool for reference:
Please add a purge option to purge the script and policy from the database.
@@ -0,0 +465,4 @@// Check if a policy already exists for this script hash// I wouldn't expect this to be possible but it's a scary world out thereconst existingPoliciesResponse = await fetch(`/v1/script-policy?FromScriptHash=${newScriptHash}&Page=1&Limit=10`Limit=10 can be Limit=1
4cdd22ff52Anything else? This should be ready.
LGTM