Verified Commit 69011a93 authored by Nadim Kobeissi's avatar Nadim Kobeissi 💾
Browse files

Minor analysis tweaks

parent 90673224
Pipeline #822 passed with stages
in 1 minute and 51 seconds
......@@ -97,7 +97,7 @@ func verifyActiveScan(
scanGroup.Add(1)
go func() {
err = verifyAnalysis(
valKnowledgeMap, valPrincipalStateMutated, valAttackerState, stage, scanGroup,
valKnowledgeMap, valPrincipalStateMutated, attackerStateGetRead(), stage, scanGroup,
)
if err != nil {
scanGroup.Done()
......@@ -164,8 +164,8 @@ MutationLoop:
valPrincipalState, _ = valueResolveAllPrincipalStateValues(valPrincipalState, valAttackerState)
failedRewrites, failedRewriteIndices, valPrincipalState := valuePerformAllRewrites(valPrincipalState)
FailedRewritesLoop:
for i, p := range failedRewrites {
if !p.Check {
for i := 0; i < len(failedRewrites); i++ {
if !failedRewrites[i].Check {
continue
}
if valPrincipalState.Creator[failedRewriteIndices[i]] != valPrincipalState.ID {
......@@ -178,10 +178,10 @@ FailedRewritesLoop:
)
break FailedRewritesLoop
}
for iii := range valPrincipalState.Constants {
if valPrincipalState.DeclaredAt[iii] == declaredAt {
for ii := 0; ii < len(valPrincipalState.Constants); ii++ {
if valPrincipalState.DeclaredAt[ii] == declaredAt {
valPrincipalState = verifyActiveDropPrincipalStateAfterIndex(
valPrincipalState, iii+1,
valPrincipalState, ii+1,
)
break FailedRewritesLoop
}
......
......@@ -56,9 +56,8 @@ func verifyAnalysis(
}
}
if o > 0 {
valAttackerState = attackerStateGetRead()
go func() {
err := verifyAnalysis(valKnowledgeMap, valPrincipalState, valAttackerState, stage, scanGroup)
err := verifyAnalysis(valKnowledgeMap, valPrincipalState, attackerStateGetRead(), stage, scanGroup)
if err != nil {
scanGroup.Done()
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment