Hi.I'm doing part of the project "Persian Linux" and I would be grateful if you could answer my question: Is there any risks that a piece of open source code change to closed source or to be used in a closed source project?if there are any,what are those risks?
The risks are the same for any other third party code, and basically boil down to "If you don't follow the requirements of the license, you could be in trouble".
I am not not a lawyer, so read the license, and consult a lawyer if you have to.
That being said, some licenses allow you to use their code in a proprietary app if and only if you do not distribute the app or the source code.
This is a slippery slope, though, because there's always the possibility that someone will get the bright idea to release it to customers without consulting you. Murphy's law says this is inevitable. Also, if you're the one who is going to to remember that it was open source licensed, and you leave the company, that makes the case even more probable.
Is there any risks that a piece of open source code change to closed source
The way you wrote this, it sounds like you are also worried that a project you decided to take on as a dependency would change their license to closed source. Depending on the license (again, not a lawyer - go consult one), they may be able to stop updating their source, but they may not be able to limit your ability to redistribute, use, or modify the existing source that has already been published.