This study aims to exploit volatile components of endophytic fungus HDM07 isolated from Cannabis sativa L.,and to explore the biosynthetic pathway of secondary metabolites from HDM07.The research took the endophytic fungus HDM07 obtained from Cannabis sativa L.as the subject.GC-MS and retrieval mass spectrometry database were employed to identify the volatile components in both the fermentation broth and mycelium of HDM07.Morphological observation and 18S rDNA sequence analysis were conducted for strain identification.Results indicated that the method of GC-MS and mass spectrometry analysis,along with database retrieval from endophytic fungi HDM07,determined 11 volatile components in the fermented liquid.Furthermore,fungus HDM07 revealed 14 volatile constituents in mycelium and Cannabis sativa L.leaf identified 12 elements.In a blank reference substance solution(PDB medium),appraisal revealed 7 ingredients.The endophytic fungus HDM07 was identified as Alternaria alternate.These findings suggest that the synthesis pathways of volatile components in HDM07 fermentation broth and mycelia are both related yet distinct.Both the fermentation broth and mycelium of endophytic fungus HDM07 contained similar or identical volatile components to those found in Cannabis sativa L.,and also contained unique ones,indicating a certain correlation between the strain and its host plant's synthesis of volatile components.