openappsec
openappsec copied to clipboard
Applying Policy error: code line 1667 [: Illegal number: in Declarative mode
Applying Policy error code line 1667 in Declarative mode, first of all this happens in two scenarios when you try to apply policy and after you terminate it during the process even though not most of the time. second scenario is just by default after installation in some cases which i eventually don't know exactly. The Bad thing when this error occurs in my experience i just have to reinstall the open-appsec again otherwise, one won't be able to apply policy again in declarative mode.
open-appsec-ctl -ap /usr/sbin/open-appsec-ctl: 1667: [: Illegal number: Policy didn’t changed. Policy path: /etc/cp/conf/local_policy.yaml root@kobe-vault:/tmp#
i have the same problem ... without any additional error information .. and during te applying the original version of the policy mode : declarative mode
Hi,
we've managed to recreate it and are looking into it, I'll update here on our progress
Hi @epaphrasmakoko @AndyAdm,
Could you please share the full details of the flow, both the policy file and the command you've used to update the policy? you can send it to [email protected] as well.
Thank you!
i have the whole file from debug command, i have the whole dump of the agent, so i should provide the the policy file only ? and in case of the command is up above in picture
i am using the default
Hi @epaphrasmakoko The following change in /usr/sbin/open-appsec-ctl , in is_apply_policy_needed(), have allowed policy to be updated (after a file modification) in my environment.
Change the following line:
if [ "${local_policy_modification_time}" -eq "${last_local_policy_modification_time}" ] || [ -z ${last_local_policy_modification_time} ]; then
To:
if [ "${local_policy_modification_time}" == "${last_local_policy_modification_time}" ]; then
Let me check it now