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( ...@@ -97,7 +97,7 @@ func verifyActiveScan(
scanGroup.Add(1) scanGroup.Add(1)
go func() { go func() {
err = verifyAnalysis( err = verifyAnalysis(
valKnowledgeMap, valPrincipalStateMutated, valAttackerState, stage, scanGroup, valKnowledgeMap, valPrincipalStateMutated, attackerStateGetRead(), stage, scanGroup,
) )
if err != nil { if err != nil {
scanGroup.Done() scanGroup.Done()
...@@ -164,8 +164,8 @@ MutationLoop: ...@@ -164,8 +164,8 @@ MutationLoop:
valPrincipalState, _ = valueResolveAllPrincipalStateValues(valPrincipalState, valAttackerState) valPrincipalState, _ = valueResolveAllPrincipalStateValues(valPrincipalState, valAttackerState)
failedRewrites, failedRewriteIndices, valPrincipalState := valuePerformAllRewrites(valPrincipalState) failedRewrites, failedRewriteIndices, valPrincipalState := valuePerformAllRewrites(valPrincipalState)
FailedRewritesLoop: FailedRewritesLoop:
for i, p := range failedRewrites { for i := 0; i < len(failedRewrites); i++ {
if !p.Check { if !failedRewrites[i].Check {
continue continue
} }
if valPrincipalState.Creator[failedRewriteIndices[i]] != valPrincipalState.ID { if valPrincipalState.Creator[failedRewriteIndices[i]] != valPrincipalState.ID {
...@@ -178,10 +178,10 @@ FailedRewritesLoop: ...@@ -178,10 +178,10 @@ FailedRewritesLoop:
) )
break FailedRewritesLoop break FailedRewritesLoop
} }
for iii := range valPrincipalState.Constants { for ii := 0; ii < len(valPrincipalState.Constants); ii++ {
if valPrincipalState.DeclaredAt[iii] == declaredAt { if valPrincipalState.DeclaredAt[ii] == declaredAt {
valPrincipalState = verifyActiveDropPrincipalStateAfterIndex( valPrincipalState = verifyActiveDropPrincipalStateAfterIndex(
valPrincipalState, iii+1, valPrincipalState, ii+1,
) )
break FailedRewritesLoop break FailedRewritesLoop
} }
......
...@@ -56,9 +56,8 @@ func verifyAnalysis( ...@@ -56,9 +56,8 @@ func verifyAnalysis(
} }
} }
if o > 0 { if o > 0 {
valAttackerState = attackerStateGetRead()
go func() { go func() {
err := verifyAnalysis(valKnowledgeMap, valPrincipalState, valAttackerState, stage, scanGroup) err := verifyAnalysis(valKnowledgeMap, valPrincipalState, attackerStateGetRead(), stage, scanGroup)
if err != nil { if err != nil {
scanGroup.Done() 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