Skip to content

Commit

Permalink
Fix security check with enum classes which use closure args
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Jan 30, 2024
1 parent 90af546 commit 1ea34cf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/analyzer/classlike_analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::statements_analyzer::StatementsAnalyzer;
use crate::stmt_analyzer::AnalysisError;
use hakana_reflection_info::analysis_result::AnalysisResult;
use hakana_reflection_info::codebase_info::symbols::SymbolKind;
use hakana_reflection_info::data_flow::graph::{DataFlowGraph, GraphKind};
use hakana_reflection_info::data_flow::graph::DataFlowGraph;
use hakana_reflection_info::function_context::FunctionContext;
use oxidized::aast;

Expand Down Expand Up @@ -39,7 +39,9 @@ impl<'a> ClassLikeAnalyzer<'a> {

let codebase = self.file_analyzer.get_codebase();

if self.file_analyzer.analysis_config.ast_diff && self.file_analyzer.codebase.safe_symbols.contains(&name) {
if self.file_analyzer.analysis_config.ast_diff
&& self.file_analyzer.codebase.safe_symbols.contains(&name)
{
return Ok(());
}

Expand Down Expand Up @@ -77,7 +79,7 @@ impl<'a> ClassLikeAnalyzer<'a> {
let mut class_context = ScopeContext::new(function_context);

let mut analysis_data = FunctionAnalysisData::new(
DataFlowGraph::new(GraphKind::FunctionBody),
DataFlowGraph::new(statements_analyzer.get_config().graph_kind),
statements_analyzer.get_file_analyzer().get_file_source(),
&statements_analyzer.comments,
&statements_analyzer.get_config().all_custom_issues,
Expand Down

0 comments on commit 1ea34cf

Please sign in to comment.